Migrating a WordPress Site

Chevy_Moving_TruckDatabase errors, broken links, missing content. Do these sound familiar? Migrating a WordPress site always seems to be harder than it needs to be.

There are many plugins and services out there to do this but they either don’t work right or are expensive. That’s why I’m sharing the method I use. Let me know how it works out for you.

Step 1: Back up the original site

You will need a MySQL dump of the database and a copy of the entire WordPress directory.

Step 2: Create destination database

Create a new MySQL database and import the source MySQL dump file into it.

Step 3: Upload original WordPress directory to the destination site

Upload the WordPress directory with all the files in it to this location. Note: If you have a different database name, username and password from the original database, then make sure you update the wp-config.php file with the new DB login info.

Step 4: Update URLs in the database

If your new site has the same URL as the original then you can skip steps 4 and 5. Edit the wp-config.php file by opening it in a plain text editor such as Notepad and adding the following lines:

define('WP_HOME','http://yoursite.com');
define('WP_SITEURL','http://yoursite.com');

This is probably the easiest method but read this post for alternatives and further information.

Step 5: Change old URL references

Login into the admin area of the new site and use one the following plugins to change all references of the old site URL to the new one:
http://wordpress.org/extend/plugins/velvet-blues-update-urls/screenshots/
http://wordpress.org/extend/plugins/search-and-replace/
http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

Then the only place that you might have to change any URL’s by hand is in Text Widgets and Slider images, if there are any.

.

Leave a Reply


eighteen − 6 =

Join Our Mailing List

Get free advice about how to rank better in search engines, maximize the value of social media, and find helpful online services to better run your business.

Join Now