Step-by-Step Instructions for Moving a WordPress Site

Programmers | Wordpress Tutorials

How to Move a WordPress SiteMoving a WordPress site can be a stressful thing, but sometimes you just can’t avoid it.

If you’re looking for a step-by-step solution with practically no downtime, you’ve come to the right place. I recently moved from one Godaddy account/server to another with just about an hour of work and no downtime for the site. The key point is doing things is the right order.

The steps below can also be used for backing up and restoring your WordPress website – and did I mention that it’s free and easy to do?

Update Current Site

I recommend updating your current site’s plugins and WordPress version before starting this process, but you can always update them after as well.

Install Online Backup for WordPress 

This plugin was created by Backup Technology and is currently free.

  1. Once installed, go to Tools -> Online Backup, then Backup (top of page).
  2. Make sure Database and File System are both checked, and choose Download.
  3. Click Start Manual Backup. Depending on your website’s size, this may take a while. Alternatively, you could download each option separately. You’ll be using the Database file first.
  4. Once the backup is complete, click Download Full Backup. This also might take a while. My site with 115 posts and pics took about 15 minutes.

Now you’ve got a backup of the entire site. That’s all you’ll need to recreate it.

Re-Create Database

  1. Set up a Database in your hosting account. Alternatively, you could install WordPress automatically using the Tool your Hosting Provider (say, Godaddy) already has.
  2. Jot down your username and password of your Database as you either create it manually or use their tool to install WordPress.
  3. Find the Zip File on your computer that you downloaded. Unzip it. You’ll use the Database files.
  4. Log into your Database. If you installed WordPress automatically, click on the Database name, then click Drop Tables, and click Yes.
  5. Click Import (top bar)
  6. Click Choose File, and find the File you unzipped. It should be a “.sql” file. Leave all other options alone, and click Go.

That should make your tables again, all nice and neat. Your new database is set up!

Re-Create the Site

Next we’re going to recreate the site files.

  1. If you haven’t already, unzip the File System folder (if you downloaded it together, you’ve already unzipped it all. Separately, and you’ll need to unzip this folder.).
  2. Copy all the files to your new Site Folder.
  3. Upload all files to your new server using Dreamweaver or another FTP program like FileZilla. This will take a while, so go grab a cup of coffee.

When that’s finally done, you’ll only have a few changes left to make before you test it! Don’t log out of your database yet, you’ll need the server name in the next step.

Update the Wp-Config File

  1. Open wp_config.php in your editor of choice.  This file will be in the files you just uploaded to your server.
  2. Remember that username and password for the database? Scroll down in this file and find the area that looks like this (it will be close to the top):
define('DB_NAME', '............');
/** MySQL database username */
define('DB_USER', '............');
/** MySQL database password */
define('DB_PASSWORD', '.................');
/** MySQL hostname */
define('DB_HOST', '...............................');

Replace the dots in the coding above (your coding will have actual passwords already in them).

  • DB_NAME = your username
  • DB_user = your username
  • DB_PASSWORD = your password;
  • DB_HOST = Find the Server name at the top of your Database

Upload the revised file to your new Site replacing the old wp_config.php file.

Make Database Edits

You’ll need to change just a few things in the database to make sure it works.

If you’re changing your URL or want to test the site before it goes life (highly recommended), you’ll need to follow the following steps:

  1. Click on the wp_options table in your new Database.
  2. Click Browse at the top of the page.
  3. Find the siteurl row and edit it to your new URL (or temporary path)
  4. Go to the second page of the results, and find the home row and edit it also to your  new URL (or temporary path).

Testing the Site

You’re almost done! Before you move the site over, though, you’ll want to test it.

  1. Open the new site up using the new domain name or simply the new path if you don’t have a domain name yet.
  2. Go through the pages and confirm everything is working.
  3. Log in. Remember to use the password that’s the same as the old site. This makes sure the new login page is working as well.
  4. Depending on which plugins you used, you might need to deactivate and then activate them again.
  5. Go through the site and make sure all your hard-coded links are pointing to your new site.
  6. Change your Permalinks settings to the same as the old site.

When everything is good to go, you’re ready for the final step!

Pointing the Domain Name

  1. Forward the domain name to the new site’s location. This will take 24-48 hours to fully take effect, so leave the old site up until after 48 hours.
  2. Once your domain name is pointed over, go back into the database and edit the URL again from the path name to the actual new URL.

And Your Done!!