A Guide on Moving Your WordPress Blog to a New Host
Over the last few weeks I’ve had several people ask for advice and help in moving a WordPress blog from one host to another. Rather than give specific how-to’s for each of the scenarios (ie. how to move from their specific host to Dreamhost), I thought it might be more beneficial, for all of my readers, if I took a step back and wrote a more general guide on how to move a WordPress blog to a new host.
Here are the steps I have used previously to migrate a WordPress blog to a new host.
1. Sign Up For A New Hosting Account
Once you have decided on a new hosting provider, the first step is to sign up and create an account with the new provider. Depending upon the provider, new account creation and setup usually takes anywhere from a few minutes to a few hours. This will give us plenty of time to complete the next few steps.
2. Update Your Current WordPress Installation
This is an important, and often overlooked, step in the migration process. The reason it is so important is because we will be using a fresh, clean install of WordPress on our new host and we want our database and files to match up. So if you haven’t upgraded your WordPress installation in a while now is the time.
3. Download and Backup All Files
Log into your current hosting account via FTP and download a backup of your /wp-content/ directory. You will also want to download a backup of any other files you may have uploaded outside the /wp-content/ directory. Be sure to maintain any directory structure you have set up. This will make it much easier for you upload your files to the correct place on the new host.
4. Backup Your Database
The next step, and this is an important one so take your time, is to backup your database. There are several ways you could go about this, but I would highly recommend using phpMyAdmin to back up your database.
Instead of reinventing the wheel, let me just point you to the WordPress Codex guide on backing up your database and Clearpoint Systems article on How to backup and restore a WordPress database, both give good step by step directions for using phpMyAdmin and a few other options.
Remember to take great care in backing up your database. All of your content is stored in this database, so you don’t want to screw it up.
5. Create Database on New Host
At this point your account on the new host should be setup and active. If it’s not, then this is a good time to take a break and check back later.
Log into your control panel on the new host and create a new database. You can use whatever name and settings you choose, but I will often use the same database name and login info as the current database on the old host. Other than making step 7 slightly easier, it’s just personal preference.
6. Import/Restore Database
We now have a shiny new (empty) database that we need to get our database backup (from old host) imported into. Again, rather than reinventing the wheel, I will point you to the WordPress Codex guide on restoring your database from a backup and Clearpoint Systems article on How to backup and restore a WordPress database, which will give you step by step instructions on restoring a WordPress database using phpMyAdmin.
7. Update config.php File With New Hosting Info
Now that we have our new database setup and our content imported into it, we will update our current (old host) WordPress installation to use this database. Open up an FTP client and connect to your current installation. Find the wp-config.php file and update it’s information with the IP address and login information of the database you created on the new host in step 5.
By doing this we insure that all new comments and updates will be saved in the new database and not lost once the transfer is complete. Alternatively, if you do not want to do this you can just turn off comments and not make any updates during the transfer process. The important thing is to make sure that if any database is being updated, it’s the one on the new host.
8. Install and Configure WordPress on New Host
If your new host provides a one click install of WordPress, just login to the control panel and click install. This process usually only takes a few minutes, but your mileage may very depending upon your host. If your new host doesn’t offer a one click install, head over to WordPress.org, download the latest version (the same version you upgraded to in step 2), unpack and upload via FTP to your new host. Be sure to maintain the directory structure you used on your old host. For example, if your blog was located at www.yourdomain.com/blog/ you will want to make sure your new WordPress installation is installed in the /blog/ directory.
Now that you have a fresh, virgin install of WordPress, it’s time to install and configure all of the plugins you are using at the old host. You can either download all of the files in your /wp-content/plugins/ directory or download the newest version of the plugins individually and install them. While it’s a good idea to make sure your plugins are up to date, be aware that a newer version of the plugin may cause a conflict with something else. It’s a better idea to stick with the versions you are currently using (old host) and upgrade them one at a time after the migration to a new host is complete.
Additional Notes:
1. When setting up a new install of WordPress, I like to use a clean database. After everything is configured and setup, I will change the config.php file to use the real database.
2. Some people prefer to just copy their WordPress install directory from one host to the next. While this may work fine, I prefer a clean install to avoid any possibility of problems.
3. You’ll need to check with your new hosting provider, but if both hosts are using the same control panel, it’s possible your new host will transfer everything over for you (including files, databases, email, etc.).
9. Upload Files to New Host
Upload all backed up files including your /wp-content/ directory and any other files you backed up in step 3 to your new host.
10. Verify Everything Is Working
The majority of hosts will provide you with either an IP address or sub-domain in which you can use to view your site before switching your domains DNS. You should now have a working WordPress installation with your theme, database, and additional files. Double, Triple, and Quadruple check that everything is working correctly.
11. Tidy Up
Now that your blog is setup on the new host, and you have verified everything is working correctly, it’s time to configure any other options in your new hosts control panel like setting up email, etc. This is also a good time to delete anything that is no longer needed (ie. that extra database I mentioned in step 8 for installing WordPress).
12. Update Your Domains DNS
Once your sure that everything is as it should be, it’s time for the ceremonial throwing of the switch. Login to the control panel for you domain name and update the Domain Name System (DNS) with the Name Servers of your new hosting provider. Your domain name should completely switch over in less than 72 hrs and if your new host is a large provider, it could be a matter of hours.
During the transition it’s likely that some visitors will be viewing two different versions of your site, the old host and new host. However, since we changed the config.php file on the old host to use the database on the new host, everyone will be seeing the same content.
Additional Notes:
If your domain registrar is the same as old hosting provider you will probably need to transfer you domain to either your new host or a 3rd party registrar. My personal preference is to use a 3rd party registrar.
13. Cancel Old Hosting
I would recommend keeping your old hosting account active until at least a week after you changed the DNS on your domain name. This gives search engines and other services a chance to fully update.
14. Exhale
Take a deep breath, unclench your teeth, relax and exhale.
|
If you enjoyed reading Average Joe Blogger why not subscribe to my RSS Feed or get it delivered directly to your email inbox. |









Great post! I’ve seen steps before on doing this, but none were as in such detail as yours. Thanks.
[…] A Guide on Moving Your WordPress Blog to a New Host from Average Joe Blogger. […]
I would recommend you to have Cpanel hosting, it gives you more backup options, best of them in my opinion are those offer Cpanel backup, where you can do a total backup for your website and restore it any time on your current host or on another Cpanel host