Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Brian Goldstein
Brian Goldstein
19,419 Points

WP Moving Question

So I have a client with a live WP install already running.

I've built a new theme locally for them, but I can't find a definitive guide to moving my files from local to live in this situation. I don't know if I need to migrate files only or files and DB or just upload the new theme, import options or what.

If anyone can point me to the definitive resource on this, or has a preferred workflow, I'd be much obliged.

(FWIW, developed on a Windows machine)

3 Answers

If it's just a theme, you only need to upload via ftp into wp-content/themes and then go to the admin section and make it the active theme. Unless you are migrating domain or db specific you will need another approach, but for a theme it's the only thing you have to do.

Andrew Showalter
Andrew Showalter
14,028 Points

If you have been developing locally just to build a theme, Juans answer is perfect. If you have your uploads directory, database, options, and settings that need to be carried over, the wordpress codex offers a good solution.

This Link is from the wordpress codex that tells about using a search and replace script that is provided by This company.

I have uses this many many times for client sites. You will just have to make sure your wp-config file contains the live server db credentials. Then, you dump the file you can download from the link above into the root of your site root. Navigate to the source file where that search and replace script is located and follow the instruction.

Quick, clean, and works very well.

Andrew McCormick
Andrew McCormick
17,730 Points

Make sure you read the codex like Andrew Showalter pointed out. The tool I live by is Migrate DB Pro . I use it on almost any site I develop. This allows me to have sites on my local environment, then when ready to show the client I just upload the files to a new WP install on my FTP ( i have a folder for just client WordPress sites), migrate the database with Migrate DB and vola I share that staging link with my client. Then when we are ready to go live, I do the same thing to move the DB and site files to the live server. They have a free version, but I've always used a paid subscription and just upgraded to the developer license a few months ago since I found myself using it on every site.

** Note that is an affiliate link above, but me being an affiliate has no bearing on how much I enjoy the product. And if you use SUPER20, you get 20% the best WordPress tool you'll ever buy.