Moving Your Site - Zero Downtime

It is possible to move a site from one web hosting account to another with absolutely no downtime whatsoever. The only noticable effect that your visitors will see is that you may have to temporarily disable interactive features on the old hosting a couple of days before the move is complete.

The key to eliminating downtime during a site move is to perform the tasks required for the move in the right order. This means that you purchase the new hosting a couple of weeks before the old hosting is due to expire so as to have the site available in both places during the time that it takes for all the domain name servers (DNS) to update their information on where to find your site.

Get New Hosting

The first step in moving your domain from one web host to another is to purchase the new hosting account.

The new host may want you to tell them the domain name you intend to host on the account as part of their setup process. Let them know what domain you are going to move to the hosting but do not make any changes to the actual domain registration at this stage as that will disable your existing site before the new hosting is set up. If the new host has an automated setup process that requires the domain to point to them before establishing the account then either ask the host to create the account manually for you or look for a different host that doesn't require your disabling your site during the move.

Upload Your Site

The next step in the process is to upload your site to the new hosting.

You should already have a copy of any static pages on your site on your own computer as a backup of your existing site. All you need to do to put these on your new hosting is to FTP the pages to the appropriate location on the new hosting corresponding to where they can be found on the old hosting. The same can be done for any scripts that you are using on your site.

If you have any databases on the old hosting you will need to back these up from the old hosting, create equivalent databases on the new hosting and then restore the databases to the new hosting. If the new hosting uses different naming conventions for databases to what the old hosting uses then you may need to manually edit the appropriate config files where the database name is supplied to the script.

The simplest way to copy all your data in a database from one hosting to the other is to use the export/import options in phpMyAdmin.

The Windows Hosts File

There is a file on all windows computers called hosts (no extension) that makes testing your new hosting before moving the domain really easy. Depending on which version of Windows you are using and how it was installed it can be in a variety of different places so the simplest way to locate it is to use the find/search option from the Start menu to find the file.Note that you will need to be logged on with administrator access to update the file (doesn't apply to Win 95/98/ME).

Check in the emails that you have received fromyour new hosting to find out what IP addresses the hosting is on. If your new hosting hasn't provided you with the IP address of their server then you will need to ask them.

We now add a line into the hosts file with toe IP address of the new hosting and the domain name of the site we are moving. The exact format of how this entry should look is described in the comments in the host file itself.

If you have anti-spyware running on your computer (for example Spybot Search and Destroy Teatimer) then when you try to save the hosts file your spyware program will pop up an alert to advise that something is trying to update the hosts file. You need to tell the spyware program that this change should be allowed (since you are the one doing it). Some versions of Spybot don't display the buttons properly, the button you want to confirm the change is the one on the left.

Now if you reboot your computer and access your domain you will be accessing the copy on the new hosting. This allows you to test your site to make sure that everything is uploaded properly on the new hosting and allows you to use your regular domain name to do the test so that anything that is domain name dependent will work properly. Note that because it is the entry in your Hosts file that is sending you to the new hosting, everyone else who enters the domain name will still see the old hosting so that you can fix any errors you made in setting up the new hosting without anyone else knowing anything about it.

If you want to access your old hosting at any time simply add a # to the front of the entry in your hosts file to comment it out and reboot the computer again. You will also want to comment the line out once you finish testing.

Move the Domain

Once you are sure that the new hostinng is working properly it is time to let everyone else see it. Depending on how dynamic the content on your site is and how long the testing took, you may want to copy the databases again so as to not lose anything that your visitors may have entered since you took the first copy. You may also decide to disable any further updates being made to the database on the old hosting. Updates being disabled or lost for up to a couple of days is the only visible indication that your visitors will have that anything is happening.

Go into the domain registration options provided by your domain registrar and update the nameservers to point to your new web hosting instead of the old web hosting.

Most domain name servers should pick up this change almost immediately but you need to allow a few days for the change to be applied to all of the domain name servers across the web that contain instructions on where to find your site.

Do not try to move your domain registration at this time or you run the risk of the nameserver updates getting lost.

Cancel Your Old Hosting

Once everyone is getting your pages from your new hosting you can cancel the old hosting. If you timed everything appropriately there should only be a short period remaining with that hosting in any case. You may want to delete the files and databases from there yourself, if so then you will need to add an entry into your hosts file using the IP address of the old hosting with your domain name so as to be able to access the old hosting with the correct domain name while everyone else continues to see the new hosting.

If you have two computers available and you set the hosts file on one to point to the new hosting and the hosts file on the other to point your domain to the old hosting then you can easily track what is happening during the transfer as you have easy access to both hosting accounts depending on which computer you use. With one computer you would have to comment out one of the entries and reboot to access the other account.

Optionally Move the Domain

It is not necessary to change your domain registrar when you change your web host since domains and hosting are completely separate things. In fact trying to change both at the same time is the easiest way to totally stuff things up and stop your site working at all.

If you do want to move the domain as well as the hosting then wait until after the hosting move is completed and then organise to move the domain registration once you know that the new hosting is functioning correctly for all your visitors.,/p>

Changing your domain registrar will change where you log in to in order to maintain your domain but will have no impact whatsoever on people using that domain to access your hosting.

go to top

FaceBook Follow
Twitter Follow