Migrating WordPress To A Different Host

I recently migrated this WordPress blog (www.paulpang.com) to a new Host. In my case, I was previously hosting the blog on Netfirms but have moved the website to Bluehost. The main reason I decided to migrate to a new host is that Netfirms does not support the installation of Autoresponse Plus and I wanted to install an Autoresponder that does not require me to pay monthly fees.

Here are the steps I took to migrate my WordPress blog to a new host, bearing in mind that the procedures for your web host might be slightly different from Netfirms or Bluehost.

  1. Upgrade Your WordPress Installation
    Upgrade your WordPress installation to the latest version. This is important if you are installing the latest version on your new host using Fantastico.

  2. Backup All Your Files
    Using a FTP program, backup ALL your WordPress files to your PC. I prefer this than backing up only the necessary files as I can then upload all the files without doing a new WordPress installation on the new host. However, if you choose to do a new WordPress installation on the new host, you need to backup at least the wp-content folder, the wp-config.php file and all other personal files you wish to transfer.

  3. Backup Your Database
    Identify the Database Name that your WordPress blog is using. Use phpMyAdmin to back it up on your PC. You can check out how to to do it at http://codex.wordpress.org/Backing_Up_Your_Database.

    In my case, I have to log in to my Control Panel, click on Hosting -> Databases -> MySQL. A list of all my Databases with columns for Database Name, Description, User Name, User Type and a link to phpMyAdmin for each database will be shown. Then click on the Database Name that you want to backup. You will see a number of tabs including Export and Import. Click on the Export tab, check “Structure and Data” and “Save As File” options and click Go. You can then save the database backup as a .sql file on your PC.

  4. Upload Your Database To Your New Host

    Create A New Database

    First you need to create a new database on your new host in order to import your database backup. In the cPanel of your new host, under Databases, click on mySQL Databases. Under Create New Database, type in the name of the database you want to create and click Create Database. The database is created.

    Next you need to assign a New User to the Database. Under mySQL Users, Add A New User, type in a new user name and password and click Create User. The new user is added.

    Next, you need to Add User To Database. Under Add User To Database, select the user and database you have created and click Add. You will be shown a screen to assign the Privileges for the user. I select All Privileges as I will be the Administrator for my blog. Click on Make Changes and the new user is now added to the database. NOTE DOWN THE DATABASE NAME, DATABASE USER AND PASSWORD of your new database.

    Importing your Database
    In your cPanel of your new host, go to Database -> phpMyAdmin. Click on the Databases tab and select the new database that you have created. Next click on the Import tab. Locate the .sql database backup file that you have saved by clicking on the Browse button and click Go. You will get a message telling you that your database has been successfully imported. 

  5. Modify  wp-config.php file
    Open the backup copy of the wp-config.php file with Notepad on your PC and make the following changes:

    <?php// ** MySQL settings ** //define(‘DB_NAME’, ‘yourdatabasename’);    // The name of the database define(‘DB_USER’, ‘yourusername’);     // Your MySQL username define(‘DB_PASSWORD’, ‘yourpassword’); // …and password define

    Replace yourdatabasename, yourusername and yourpassword with the values that you noted in Step 4a above and save the file. This will point WordPress to the new database that you have imported.

  6. Upload WordPress Backup Files
    Using a FTP program, upload ALL the WordPress files that you have previously backed up in Step 2 to your new host including the modified wp-config.php file from Step 5.

  7. Change DNS Settings
    Log in to the cPanel of the old host. Under Domains -> Domain Manager, click on the + sign to expand the details of the domain name that you are changing settings for. Click on the Security tab, then click on UNLOCK to unlock the domain name settings so that you can make changes. Next, click on the DNS tab and change the DNS settings to your new host. In my case, it is  NS1.BLUEHOST.COM and NS2.BLUEHOST.COM. Click on Modify to save your settings. If you are not planning to transfer your domain name registration to your new host, then go back to the Security tab and LOCK it again.

  8. Transfer Domain Name Registration
    If you want to transfer the registration of your domain name to your new host, make sure you keep your domain name UNLOCK in Step 7 above. In Step 7 above, click on the Transfer tab where you will be able to obtain the AUTH INFO CODE (sometimes called the EPP or Authorization Code). Note down this code as it is required for the transfer as it is used to verify that you have access to the existing domain registration.

    Next log in to your cPanel of the new host and go to Domains -> Transfer Domain. Enter the name of the domain you want to transfer and click Continue. Enter the EPP Authorization Code and click Continue. Once you have entered the correct EPP authorization code, an email will be sent to the Administrative contact listed on the WHOIS record for the domain. Copy the Verification Code that is in the email and paste it in the Admin Contact Verification Code field and click Continue.

    In the Transfer Settings page, under Terms of Service, tick “I own this domain and I agree to the Domain Registration Agreement.” And click Add Transfer to Shopping Cart. (If you have not verified you account with Bluehost, you will not be able to proceed to the next Step. See Step 10 below to verify your account)  In Bluehost case, you will have to extend the renewal of your Domain Name Registration by one year. Next choose your payment method and pay for the additional year of registration. You have now completed the transfer of your domain name to your new registrar. In Netfirms case, you will receive an email from them asking me to Approve or Cancel the transfer. If you do nothing, the transfer will proceed after several days. If you want to approve it immediately, go to your cPanel -> Domain Manager -> Transfer tab of your domain name and click Approve.

  9. Assigning An Add-On Domain in BlueHost
    In cPanel, under Domains, click on Addon Domains. Select “Use a domain that is already associated with your account” and select the domain name of the domain you want to add on if it is not already selected. In Step 3, select Addon Domain. In Step 4, specify the Directory you want the Add-on Domain to point to and click Add Domain.
  10. Verification Of Bluehost Account
    Before you can have full access to your hosting account and related promotions and services, ypu need to provide Bluehost with an email of the account holder’s government-issued photo identification (such as a driver’s license or passport). You need to  include your main domain name along with your ID and email it to verification@bluehost.com.

Leave a Reply