Moving a WordPress Site

Moving a WordPress site can be a bit of pain in the butt if you haven’t done it enough times.

You have built the WordPress site in a “testing area” and you want to make that site live now that it’s been approved to be launched.

Here are the instances that you would want to move a WordPress site:

1. The new domain is on the same server as the “testing area” and all you have to do is move the directory and make some small adjustments.

2. The new domain is not on the same server nor is it in the same database as the “testing area” and you will have to take some extra steps to get there.


Let’s start with #1.

First off..

  • You need to upload WordPress files to the new directory. This uploading process takes a while, let’s face it WordPress has a ton of files!Advised: to use Cyberduck or some other FTP transfer software to do this, Dreamweaver I find times out easily with all those files.
  • Go ahead, while that file transfer is going on, login to your database to change the site domain to the new domain by manually reviewing wp_x_options: fileupload_url, home, siteurl to name the main ones. You will see the old domain, make sure you change that to the new domain and click “Go” to save the change.
  • Once all files have been uploaded to the new domain, you will need to generate a config file again, just enter the same database information (if it remains the same) and if not, enter in the new database information.
  • You will login with the same username and password.
  • Right now your homepage should work, but you need to resubmit your Permalinks, to do that go to Settings > Permalinks at the bottom left of the dashboard. Your Permalinks just need to be refreshed, so click on “Update” at the bottom, no need to choose anything, the settings are already preset for you.
  • The pages are showing up like they should, but you will notice that the images are still being directed to the “testing area,” so I would go in through Posts and Pages and search for that old domain and go in and start replacing the old domain with the new domain. Depending on how many pages/posts you have, it’s a pretty simple change to make.
  • TADAAAA!! The WordPress site has now been moved to the new domain!

help_social_media

The #2 scenerio is a tad bit complicated but nothing we can’t handle!

  • First thing I would do is login to your “testing area” database and Export that database in SQL format, be sure to select the one you want to Export. Click “Go”You will see the database in a text field, copy and paste that in a text file and save it on your computer.
  • Login into the new database area that you want this to be moved to, be sure to create a new database (uniquely named for your site) and then click “Import” and you will have to upload that text file to the new database.
  • Since you are already here, go ahead and change the site domain to the new domain by manually reviewing wp_x_options: fileupload_url, home, siteurl to name the main ones. You will see the old domain, make sure you change that to the new domain and click “Go” to save the change.
  • You need to upload WordPress files to the new domain.This uploading process takes a while, let’s face it WordPress has a ton of files!Advised: to use Cyberduck or some other FTP transfer software to do this, Dreamweaver I find times out easily with all those files.
  • Once all files have been uploaded to the new domain, you will need to generate a config file again, just enter the new database information and set a username and password.
  • Right now your homepage should work, but you need to resubmit your Permalinks, to do that go to Settings > Permalinks at the bottom left of the dashboard. Your Permalinks just need to be refreshed, so click on “Update” at the bottom, no need to choose anything, the settings are already preset for you.
  • The pages are showing up like they should, but you will notice that the images are still being directed to the “testing area,” so I would go in through Posts and Pages and search for that old domain and go in and start replacing the old domain with the new domain. Depending on how many pages/posts you have, it’s a pretty simple change to make.
  • TADAAAA!! The WordPress site has now been moved to the new domain and new database!

Recommended: Do not to delete your “testing area” until you are done with the transition steps above.