How to Migrate a WordPress Site

Wordpress in a car

Moving WordPress?

Are you looking to move your WordPress site to another server?  Want to duplicate it so you have a test environment? Does this seem too daunting to you?  Well, having done this dozens of times, I shall reveal my method of moving WordPress to another website.

NOTE: In order for this to work, you need access to the MySQL back end for your destination site.

Step 1: Write down the site URL for your current site (ex: www.brettgorley.com\blog)

Step 2: Install the Updraft Plus backup and restore plugin

Step 3: Do a full backup of your site.  (This may take a while depending on your site)

Step 4: Download the backup files when it is complete

Step 5: Install WordPress on your destination site (ex: 192.168.0.100 shall be my destination test server)

Step 6: Install the Updraft Plus backup and restore plugin

Step 7: Restore the backup from your old web site to your new one
We will be overwriting the database which will make our site become unreachable. DON’T PANIC!

Step 8: Open up your WordPress database in phpMyAdmin (or command like if you prefer- don’t ask me for help with this though)

Step 9: In the wp_options table, change the following fields:

  • “home” value to your new URL (ex: change http://www.brettgorley.com/blog to http://192.168.0.100)
  • “siteurl” vale to your new URL

Step 10: Browse to the new WordPress site’s admin console (in my example, http://192.168.0.100/wp-admin)

Step 11: Install and activate a plugin called Velvet Blues Update URLs

Step 12: Go to Tools/Update URLS.  It will list the Old URL and the New URL.

  • Enter your old URL, the one from your original site (ex: http://www.brettgorley.com/blog)
  • Enter your new URL, the one from your new site (ex: http://192.168.0.100)
  • Check all the check boxes, including the Update all GUIDs
  • Click Update URLs NOW

Step 13: You should get a results page showing number of items updated.

At this point your new website should be fully working and functional.  But, due your due diligence and test everything just to make sure.

I’ve done this type of transition a dozen times and I have never failed to duplicate a WordPress site using this method.

 

 

Permanent link to this article: https://www.brettgorley.com/?p=997

Leave a Reply

Your email address will not be published.