Do Not Migrate a Site With WordPress Export/Import

If you use the built-in import/export to migrate a WordPress site, you’re doing it wrong. You don’t save any of the site’s settings or the plugin settings. Please figure out a better way to migrate a site.

What You’re Messing Up

First of all, the WordPress export doesn’t move everything. Here’s what makes up your site: the core code, uploads, your theme, plugins (and their settings), posts, pages, users, and settings. WordPress export only exports posts, pages, uploads (if they’re used in a post or page), and users (if they have authored a page). That’s a horrible excuse for a migration. Given that the core code is generally the same (as long as you’re going to and from the same version), but it misses settings, plugins, and themes.

Most people that use the built-in export manually move plugins and the main theme, then manually try to copy the settings over. You’re dumb for thinking this is easier.

How To Fix It

It doesn’t take a pro to properly move a site. Chances are, your host has phpMyAdmin. Use it to get a database dump (all tables) and select store as a file. If you don’t have access to phpMyAdmin, it’s fairly simple to install; just make sure you place it in a non-standard directory, such as my_pma, because phpMyAdmin is a common hacker target. They try random domains and just try to get to the phpMyAdmin folder, or sometimes with a trailing version number. If you’re moving from one domain to another, you’ll need to change some things in the database. Open your db dump in a text editor (if you can, some dbs are HUGE) and do a find/replace, replacing your old domain with your new domain.

For the files, just copy everything in your document root, which is the folder with wp-config.php in it. It should also have the folders wp-content, wp-includes, and wp-admin. It is typically either the folder you start off at when you log in through ftp, or one of the folders in your starting folder. Make sure you edit wp-config.php with your new database name, database username and password, and your database host. Traditionally, this will be localhost, but some hosts, like GoDaddy, use a separate server to host databases.

Exceptions

While I do hate the WordPress import/export, there are some legit cases for using them. For instance, if you’re moving the content (and just the content) from your old site on your old server to a newly designed site on a new server, it’s pretty helpful. The method I gave previously would blow away your new site and replace it with the old one. I’m sure there are other cases… Probably.

There you go, there’s how to do it. Don’t let me see you migrating your client’s dev site to their live site using the good old import/export tools in the tool menu. If you do, I’ll find you.