Moving Your Web Site to a Different Host

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:

  • Manually through backing up your database and downloading essential files
  • Using a plugin to automate as much of the process as possible

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.

Creating a backup and moving manually

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

  • Blog posts, pages, and custom post types
  • Links, categories, and tags
  • Post and page options, such as excerpts, time and date, custom fields, categories, tags, and passwords
  • WordPress settings you configured under the Settings menu in the Dashboard
  • All widgets that you created and configured
  • All plugin options that you configured for the plugins you installed

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:

  • Media files: The files you uploaded by using the WordPress media upload feature, including images, videos, audio files and documents. Media files are located in the /wp-content/uploads folder. Connect to your Web server via FTP and download that folder to your local computer.
  • Plugin files: Although all the plugin settings are stored in the database, the actual, physical plugin files are not. The plugin files are located in the /wp-content/plugins folder. Connect to your Web server via FTP and download that folder to your local computer.
  • Theme files: Widgets and options you've set for your current theme are stored in the database; however, the physical theme template files, images, and stylesheets are not. They're stored in the /wp-content/themes folder. Connect to your Web server via FTP and download that folder 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:

  1. Create a new database on your new hosting account.

    The steps for creating a database are found in Book II, Chapter 4.

  2. Import your database backup into the new database you just created:
    1. Log in to the cPanel for your hosting account.
    2. Click the phpMyAdmin icon and click the name of your new database in the left menu.
    3. Click the Import tab at the top.
    4. Click the Browse button and select the database backup from your local computer.
    5. Click the Go button; the old database imports into the new.
  3. Install WordPress on your new hosting account.

    The steps for installing WordPress are found in Book II, Chapter 4.

  4. Edit the wp-config.php file to include your new database name, username, password, and host.

    Information on editing the information in the wp-config.php file is found in Book II, Chapter 5 and Chapter 6.

  5. Upload all that you downloaded from the /wp-content folder to your new hosting account.
  6. Browse to your domain in your Web browser.

    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.

Using a plugin to back up and move to a new host

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:

  1. Purchase and download the BackupBuddy plugin from http://ewebscapes.com/backupbuddy.

    At this time, the cost for the plugin starts at $45.

  2. Install the plugin on your current WordPress Web site.

    By current, I mean the old one, not the new hosting account yet.

  3. Activate the plugin on your WordPress Dashboard.

    Choose Plugins in the navigation menu and then click the Activate link under the BackupBuddy plugin name.

  4. Navigate to the Backups section on the BackupBuddy options page.

    Click the Backups link in the BackupBuddy menu.

  5. Click the Full Backup button.

    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.

  6. Download the importbuddy.php file.

    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.

  7. Connect to your new Web server via FTP.
  8. Upload the backup.zip file and the importbuddy.php file.

    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).

  9. Create a new database on your new hosting account.

    The steps for creating a database are found in Book II, Chapter 4.

  10. Navigate to the importbuddy.php file in your Web browser.

    The URL for this looks similar to http://yourdomain.com/importbuddy.php.

  11. The BackupBuddy page loads in your Web browser.

    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.

  12. Load your Web site in your Web browser.

    After BackupBuddy does its thing, your Web site is ready to use like always.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.186.147