Shift website hosting – part 1 (static site)

Slowly people are realising the importance of paid hosting or at least professional and quality hosting. In website hosting, there is a golden rule – if something is too good to be true, then probably its not true! Many people use free/cheap hosting services to save money. But soon realise that quality of services (uptime, speed, support, etc.) is not upto the mark.

But then comes the dilema of shifting from one server to another and a whole lot of doubts set in, especially for those who have never changed servers!

  • How to do it?
  • What to do?
  • What not to do?
  • When to change DNS of domain names?
  • What if I lose some important mail in the process?
  • and so on …

Here I have enumerated steps of transferring a “STATIC” site. It may look a little confusing if you haven’t done it before, but the steps are pretty straight-forward once you understand the logic behind them. Here are the steps in short:

  1. Check versions:
    Check various versions and compatibilty at new server. For example, if you have some PHP pages, check if version of PHP at new server is compatible with your pages.
  2. Stop site changes:
    Stop all updates to the site. You can’t stop emails from coming, but stop the site updates/corrections. If there are many people updating a site through FTP, then I suggest changing the passwords of all FTP accounts to prevent them from accidently updating the site.
  3. Backup data:
    Backup the site pages. Use FTP and download all the files on the existing server. See to it that you maintain the directory/folder structure when you download.
  4. Email and FTP list:
    Note down or save a list of all the email addresses – mailboxes as well as forwarders. Also save a list of all FTP accounts.
  5. Upload:
    Get FTP details from your new service provider and upload all the files. Once again maintain the directory/folder structure. If your new hosting account has cPanel (and in my opinion, it should be cPanel!), then in most probability, the new FTP server will be ftp.your-new-provider.com or you can also use the IP address of the new service provider. You can use your cPanel username/password as your FTP username/password.
  6. Check site:
    After all the files are transferred, check if your new site is working properly. Get the details of how to check this from your new hosting service provider. Once again, if its cPanel, you can view your new site with http://www.your-new-provider.com/~your-cpanel-username or http://new.ip.add.ress/~your-cpanel-username. If there is some error or missing links, correct the problem before proceeding any further.
  7. Setup email accounts:
    Login to the control panel of your new hosting account and configure all the email addresses including all forwaders and FTP accounts. Once again, if its cPanel, you can login with http://www.your-new-provider.com/cpanel or http://new.ip.add.ress/cpanel. Double check the spellings of all the email addresses. For complete safety, specify a “catch-all” mail account so that you don’t lose any mails.
  8. Change DNS:
    Now is the right time to change the Domain Name Server (DNS) of your domain name. It takes upto 48 hours for this change to take effect and its called DNS propogation. Once DNS propogation is complete, visitors and mails will start flowing in to the new server.

Now the site transfer is complete. 🙂 You can resume your site updates.

Note:

  • These steps do not take care of left-over emails i.e. emails received before DNS propogation. Look out for part 2 on how to retrieve left-over emails.
  • By static site, I mean a site which doesn’t use a database (like MySQL, PostgreSQL, etc.). Even if the pages are generated using something like PHP or ASP, if there is no back-end database I consider that site as static for the purpose of this post/article. I intend to talk about dynamic/database driven sites in part 3.
  • There are ways of transferring files from one cPanel to another without downloading to your machine and also ways of taking backup of entire sites including email accounts. But I will talk about it later some time, may be in part 4 and 5. 🙂
  • If your old server is Windows based and the new one is Linux based then be ready to change some links. Windows is not case sensitive (i.e. “A” and “a” is same). But Linux is case sensitive. So if proper care is not taken while coding the pages, your sites may throw up some “404 – page not found” errors.
  • If your emails and visitors are important to you, then at least for a week (minimum 3 days), you will need to have access both the hosting accounts.


Licensed under Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.

8 thoughts on “Shift website hosting – part 1 (static site)”

  1. Thanks Aseem you are right about TTL.

    However, this tutorial is for those who have shared hosting or “a hosting account” and need to transfer 1 (or a few more sites). So they may not have control over TTL. Secondly, usually when people shift hosting, the old hosting provider may not co-operate. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *