Switching webhosts in eight easy steps

Thu, 31st January 2008, 19:45

Moving your website can be an intimidating process. You may have decided to move from a hosted solution (blogger,, etc...) to the freedom self-hosting brings. You may have outgrown your current hosting provider and see greener pastures elsewhere. Whatever your reason may be, the thought of moving might seem overwhelming. Thankfully it isn't as hard as it may seem. We here at hostjury thought it might be helpful to provide a guide. This can't possibly cover all options, but will at least give you a general idea of what is involved in migrating to a new host.

Step 1: Find a Host

This can be the hardest step. Do your research. This site offers plenty of hosting reviews. Go to the forum sections of the hosts that interest you, if they are available, check out complaints and resolutions. Most hosting companies offer a status blog or section in the forum, use this to check uptime. Do a search with the host's name and the word “problems”. The results might be very interesting. Don't hesitate to mention your concerns to the host you are considering. Be firm, but also be willing to give them the benefit of the doubt. Everything may look good, but you read one very harsh review. Offer the host the chance to explain the situation. It may be this particular customer was very difficult to deal with. Overall, use your common sense and listen to your instincts.

If you are new to having a site hosted, I cannot stress the importance of this step. Some hosts offer great deals if you sign up for a year. You don't want to buy a year only to deeply regret it later. Put the same amount of care into this decision as you would any other important one in your life. It could have repercussions that last years. If you aren't new to paying for hosting, you already know how critical this step is. One rule of thumb, don't always jump at the cheapest price. Fully investigate everything.

Step 2: Plan

Count on giving yourself at least a week, probably two, for everything to happen. If you are switching hosts and nearing the end of a contract, the sooner you get going the better. You do not want to start three days before your contract expires and face billing issues or an inaccessible account. Go easy on yourself and give the process at least two weeks. Do not inform your current host you are moving.

Review this overview and base your plan on how long it will realistically take you, factoring in worst-case scenarios. Everything should go very smoothly, but you never know. Murphy's law might decide to appear.

Step 3: Backup

You should always have a full backup copy of your site on a local computer. If you don't, do it now. You are probably using an FTP client to upload files to your site, if not Filezilla is an excellent free FTP client (and Open Source!). Back up your entire site so you have it available.

If you use databases like MySQL, back up your database. This can be done through your webhost's control panel. There are a variety of ways to do this, depending on what you use. Wordpress, for example, has a plugin that will take care of it for you. If you use phpMyAdmin, you will want to log into that on the server. Once logged in:

  1. Select “Databases”

  2. Click the name of your database

  3. Click the “Export” tab

  4. Choose “Select All” from the left column

  5. Make sure the “SQL” button is selected; also check: Structure, 'Add DROP TABLE', 'Add AUTO_INCREMENT' and 'Enclose table and field names with backquotes'

  6. Make sure the “Data” box is checked, but leave the checkboxes inside unchecked.

  7. Check “Save file as” and leave the default choice

  8. Check “None” for compression

  9. Click “Go” and save the file to your computer. Then check “zipped” (or gzipped/bzipped if you prefer) and click “Go”again.

  10. You now have two backups.

Step 4: Upload to New Host

Upload your backup copy of your files to the new host. If you have a new domain, make sure all of your internal links are changed to point to the new domain. If you are keeping your domain, your internal links should be fine.

Restore your database to the new host, make sure your links to the database are changed to match the new host. This varies depending on what you are using, check the documentation for the CMS you use. It is possible your new host may handle this step for you. If you are nervous (I was), just ask.

To use phpMyAdmin:

  1. Logon to your new server

  2. Click the “Import” tab

  3. In the following “Location of Text File” screen, choose “Browse” and choose your backup

  4. Double-check that the “SQL” box is checked

  5. Click “Go”. Go get some fresh air, or have a cigarette

  6. After a bit of time, you will see a success screen. You are done.

Be sure to double check your .htaccess file to make sure it is up to date and correct.

Once you feel confident everything is working as it should, move on to the next step.

Step 5: Recreate your Email Accounts at your new host

Set up all existing email accounts at the new host. This is typically done through your webhost's control panel. Any forwarders, aliases or auto-responders you had set up on the old host need to be set up on the new. Set up your “catch-all” account if one isn't pre-set for you. Once your DNS change has gone through you will be all set to receive mail.

Step 6: Update your DNS Records

If your domain name is new or you are keeping the same name, this step is the same. Go to your registrars site, log into the control panel. Look for “Nameserver” or “DNS” and plug in the Primary and Secondary nameserver information you received from your new host. In theory it should take about 48 hours for your DNS records to propagate, in reality it may take a week or two. Aren't you glad you got an early start?

Check the email at both the old server and new server while this change is happening. Don't use your domain name to check the email during this period, use the IP address of both the old and new server. It is possible some mail is going to both, separately.

Step 7: Cancel your Old Account

Once you feel confident the change has taken place, you can cancel your old account. Your site has been available to the non-updated DNS servers, now that they are updated you no longer need two versions of your site out there. Leave on a positive note, even if you were unhappy.

If you had a free hosted site, change your .htaccess there if possible. For each page, do the following:

“Redirect permanent /oldpage.html

Removing the quotes and putting the relevant info in. This works much better than a simple redirect page, it allows the search engine benefits you have built up to stay in place until your new domain has been indexed properly.

If your old host is also your registrar, be careful. This situation will be getting its own article very soon. You should have no problems, but you never know. Play it safe.

Step 8: Relax, Celebrate and Enjoy Life

You are done. Hopefully everything went smoothly. Enjoy your life with the new host and review them here!

If you have switched hosts, leave us a comment telling us how it went! Thank you.