Moving Day: A Guide for Moving One WordPress Site to Another
One of the best parts of WordPress is just how easy it is, not only to import content in from other content management systems, but to export and take all of your content with you out of WordPress itself. There isn’t the feeling, like with so many systems and web apps out there, that you are deliberately being locked down into using one particular system. And like anything, there is an art to moving your WordPress site from one location to another.

Why move?
There could be any number of reasons for moving your site to a new location. Perhaps you are changing hosting providers (as we all do at one point or another) and are moving all of your stuff someplace new. Most of the time, for me, it’s because I’m setting up a client’s site based on a local or remote testing installation.
A better question would probably be: why test? More often that not you will be moving a WordPress site to a new location because you first had it in place, testing it. And this is only smart. Live testing, where people know how to find it, is never smart. Testing it in secret can help you foresee and diagnose many of the potential problems, and help you save face once you turn it live.
In the 100 or so odd times I’ve moved a WordPress site from one location to another, I’ve casually put together a mental checklist that I go through to make sure I hit all of the points I need to, and to speed the process up. Consider this a mental brain dump, for your benefit.
First things first: handle your content
The most important part of your site, you’ll want to move over your content first. When I say content, of course, I’m talking about a couple of different things. Most obviously it’s your database export. You can grab the XML file of that content at Tools > Export. This is pretty straightforward, and shouldn’t really confuse you.
If you are moving from one remote host location to another, then moving content is pretty simple. In your new WordPress installation, go to Tools > Import and select the file you just exported from your other site. Be sure to check the box that will download and import all of the files from the other site you’re moving from. This will grab any images/files you uploaded and reconstruct the uploads folder appropriately.
If you’re moving from a local WordPress site to a remote one (let’s say you’ve been testing locally, for instance) then this process is a little bit more difficult. You can’t actually trust WordPress to find and import all of your files, since your site is hosted locally, and WordPress won’t look on your computer. So in this case you’re going to have to grab your wp-content/uploads folder manually, and move it over.
The easiest way to make sure all of the files are linked up correctly throughout your site is to use a nifty Plugin called Search and Replace. It will run through all of your content — pages, posts, everything — and replace any string with another string. So, have it replace your original site’s URL (only the beginning, before the /wp-content part starts) with your new one. This should cover your bases pretty well.
Move over relevant Plugins
Now turn your gaze to your wp-content/plugins folder. One of the reasons I like testing before pushing a WordPress site live is that I often go through a couple of Plugin options when solving simple problems. Odds are that I’ll have a number of Plugin choices that I didn’t use lying around, cluttering things up. So when I push everything to its live location, I’ll only take the Plugins I’m actually using. I suggest you do the same thing.
Match relevant settings
You’ll want to make sure that your settings are the same between your two installs as well. The easiest way to do this is just to open up two tabs and run through all of the screens within your Settings tab of the Dashboard and make sure everything is the same. Depending on the number of Plugins you normally run, this may be a fairly large endeavor.
A couple of things I always watch out for:
- Be sure that the home page and blog page are set correctly on the Settings > Reading page.
- Check that your comment settings (in Settings > Discussion) are set the same, specifically the number of threaded comments you’re allowing.
- Set your permalinks (Settings > Permalinks) to be what you had them before. Otherwise, any linking you did within your site will likely be screwed up, even using the Search and Replace Plugin.
Note: If you do happen to change your Permalinks structure, use a Plugin like Redirection to send URLs to their new locations.
What do you do when moving your sites?
Every site move brings its own problems and frustrations. Odds are you’ve discovered your own methods for making this a painless process, and that you’ve come across some ideas that I haven’t. Speak up in the comments.








Eugen
Posted on July 23rd, 2009 at 3:31 PM
Why not use mysql export/import and moving your FTP files to keep all the settings?!
Ryan Imel
Posted on July 23rd, 2009 at 3:49 PM
That’s definitely a possibility, sure. But, as I’m sure you know, for most users the best instructions to provide is not to tell them to start poking around in their MySQL. It’s a technique that advanced users will use, for sure, but then again this isn’t really aimed at advanced users.
Kel
Posted on July 23rd, 2009 at 8:32 PM
I recommend the mysql route too. Often things get missed in the WordPress export that you might not expect. I recently moved a site that had 80 Link Categories and nearing 500 Links in the Links section (blogroll). Guess what - none of that is included in the WXR export. Yes, there is a plugin which can handle import/export specific to the blogroll stuff - but the point is that MySQL export gets all that stuff.
Further - the non-advanced users might also miss out on data set up for them by other developers - data that might include custom DB tables or fields not in the WPCustom entries… just sayin’
Paul Myatt
Posted on July 24th, 2009 at 1:36 AM
The way I do it:
1) Use mysqldump to dump the WP database (safer than phpMyAdmin which sometimes screws-up character encoding)
2) Use SCP or SFTP to move WP directory and database to new server
3) Import database from shell
4) Make adjustments to the WP config file
Dan Philibin
Posted on July 24th, 2009 at 11:09 AM
I agree with Ryan - if I ever have to move a site I download the SQL file, find/replace the URL (sometimes returns 100s of instances), and then import into the new site. More often than not, there are tons of plugins installed on the site and trying to match settings would take all day.
However, for the typical WordPress user, this is a great guide to moving your site. Thanks for the post, Ryan!
Karl
Posted on July 24th, 2009 at 11:37 AM
Ive used both methods. Normally I prefer the Tools Export setting as this takes care of most items. There are a few plugins that may require you to use the my sql method, but I have had to move from our test servers to a clients host servers before and the sql export method (because I did not have domain access to wp-admin yet) was used and different providers often use different prefixes for the sql field names and this can cause a lengthy transfer process.
It is definitely good to know how to do both but the simpler the transfer can be the better for most users.