Migrating WordPress websites to a new web hosting company can be confusing and frustrating. Not only do you have to worry about the thousands of files (including themes, plugins and uploaded images), but then you have to deal with the database.
And if you happen to be moving a site from a local or testing server with a different URL, oh what a freaking nightmare! URLs have to be changed in the database and some of those are serialized, making things that much more complicated.
But it doesn’t have to be.
Migrating WordPress the Easy Way
1. Create the Database on the New Server
The first thing to do is get your account with the new web host all set up. The biggest thing is to create a blank database. Most webhosts have a tool on the control panel that walks you through creating a MySQL database. It may be called MySQL Manager or Database Wizard. Be sure to create an empty database and a user with all privileges. You will need to write down the exact database name (including any automatic prefixes), the database username and the password for that username.
2. Install Backup Buddy on the Existing WordPress Site
Let me say, that this is NOT an advertisement for Backup Buddy. I paid for my license same as anyone else. I am posting about it because it has made migrating a site so easy and stress free. Not to mention, it is a great plugin for running regular backups of your entire WordPress site. Use it, because it works and it can save your bacon.
So if you haven’t already done so, purchase a license for Backup Buddy and install it on your WordPress site as a plugin.
3. Run a Complete Backup with Backup Buddy
With Backup Buddy installed, click on the Backup Buddy menu’s Backup page. You have your choice of running just a database backup or a complete backup (database and files). Run a complete backup. Once the backup is complete, download it to a safe location.
4. Create the importbuddy.php File
Go to the Backup Buddy’s Restore/Migrate page and then click on the “Download importbuddy.php” file button. Save it alongside where you saved the backup file. It will ask you to create a password. Just use something simple and easy to remember.
5. Change the DNS Server Information with your Domain Registrar
Go to the site where you registered your domain name. There should be a place in the settings to change the DNS Server information to the addresses that your new hosting company provided. A DNS Server address usually looks like n1.myhostingcompany.com. Put in all of the addresses provided by your new host. One these changes are saved, your domain registrar should point visitors to the new hosting company, although sometimes it takes a bit of time for these changes to filter through the internet.
6. Upload the Two Files to the New Hosting Server
Now you need to transfer both the zipped (compressed) backup file and the importbuddy.php file to the new server. You can use either FTP (using a free app like Filezilla) or SSH (using your command line tool) to transfer them to new web host. Most web hosts provide the FTP (which stands for File Transfer Protocol) details in their welcome email. If you have questions, contact your new web host.
You will most likely upload the files to a folder called public_html or www. If it has both, use either one.
7. Open up the importbuddy.php Page
In the modern browser of your choice (Firefox, Chrome, Safari), navigate to the importbuddy page. (e.g. www.mydomainname.com/importbuddy.php). From there, Import Buddy will walk you through the process of importing the backup file information and setting up the connection details for your new database.
8. Open up your migrated website.
Once the Import Buddy process is complete, open up your migrated website. If you run into any problems, go to http://ithemes.com/codex/page/BackupBuddy for troubleshooting.
There’s an Even Easier Way, too
Backup Buddy also has a Magic Migration Method that allows you to migrate the site right from the WordPress dashboard. For how to do that, visit http://ithemes.com/codex/page/BackupBuddy:_Magic_Migration.
Need More Help?
If you liked this article, be sure to sign up for your FREE subscription to the Nickel's Worth of Free Advice newsletter where we send helpful articles every Tuesday and Friday. You can either fill out the form on the right side of this page or visit the Nickel's Worth of Free Advice signup page.
We're also happy to provide assistance directly. Just send an email to email@example.com.