There may come a time that you decide you need to switch from your current hosting provider to a new one. There are reasons why someone would have to do this — either you're unhappy with your current provider and want to move to a new one, or your current provider is going out of business and you're forced to move. Transferring from one host to another is a reality that some Web site owners must face, and transferring an existing Web site, with all of its content, files, and data, from one host to another can seem a very daunting task. This section of the chapter should make it easier for you.
You can go about it two ways:
Obviously, using a tool to automate the process for you to make it easier is the more desirable way to go, but just in case you need to do it manually, in the next section of this chapter, I provide you with the instructions for doing it both ways.
In Book II, Chapter 5, we provide you with step-by-step instructions on how to take a backup of your database by using phpMyAdmin. Follow the steps available in that chapter and you'll have a backup of your database with all the recent content you've published to your blog. However, when we say content, we mean what you've (or someone else has) written or typed into your blog via the WordPress Dashboard, including
Other elements of your Web site aren't stored in the database, which you need to download, via FTP, from your Web server. The following is a list of those elements, including instructions on where to find them and how to download them to your local computer:
Now you have your database and WordPress files stored safely on your local computer; moving them to a new host just involves reversing the process:
The steps for creating a database are found in Book II, Chapter 4.
The steps for installing WordPress are found in Book II, Chapter 4.
Information on editing the information in the wp-config.php file is found in Book II, Chapter 5 and Chapter 6.
Your Web site should work and you can log in to the WordPress Dashboard by using the same username and password as before because that information is stored in the database you imported.
BackupBuddy is a plugin that moves a WordPress Web site from one hosting environment to another. This plugin is not free or available in the WordPress Plugin Directory, but it's worth every penny because it takes the entire backup and migration process and makes mincemeat out of it — meaning, it makes moving the site easy to accomplish and can be done in minutesrather than hours. Follow these steps to use this plugin to move your site to a new hosting server:
At this time, the cost for the plugin starts at $45.
By current, I mean the old one, not the new hosting account yet.
Choose Plugins in the navigation menu and then click the Activate link under the BackupBuddy plugin name.
Click the Backups link in the BackupBuddy menu.
This initiates a full backup of your database, files, and content and wraps it neatly into one .zip file for you to store on your local computer.
Click the importbuddy.php file on the Backups page and download it to your local computer, preferably in the same directory as the backup file you downloaded in Step 5.
These files should be uploaded in the root, or top level, directory on your Web server (on some Web servers this is the /public_html folder; on others it might be the /httpdocs folder — if you're unsure what your root directory is, your hosting provider should be able to tell you).
The steps for creating a database are found in Book II, Chapter 4.
The URL for this looks similar to http://yourdomain.com/importbuddy.php.
Follow the steps to import the backup file and install WordPress, including the database information needed: database username, name, password, and host. This entire process takes about five to ten minutes, maybe more depending on the size of your Web site.
After BackupBuddy does its thing, your Web site is ready to use like always.