This article provides a detailed step by step process for migrating a website from one web hosting provider to the next without disabling the delivery of either the website or email services associated with the domain.
A summary of the steps involved in the process are:
- Make sure you have all necessary information
- Request set up of the hosting account with the new provider
- Replicate DNS with the new provider
- Re-delegate the domain name
- Copy the site content
- Test the site on the temporary domain
- Configure email services
- Change DNS records.
- Migration completed
Before you begin make sure you have everything you will need to complete the migration. This includes, among other things:
- Domain password or registry keys
- Access to the web hosting account on the existing web hosting provider
- Ability to perform database dumps on the existing web hosting provider
- All SSL certificate files (if there is one)
- Checked that the hosting platform is compatible (ie versions of applications, Linux vs windows).
- List of all existing email addresses
- Setup the web hosting account with the new web host
Make sure that the website hosting account is setup with the new web hosting provider. Setting up the account will not interfere with the operation of the existing live site. When the web hosting account is configured with the new host, you should receive all the access details for adding content to the account.
We highly recommend redelegating the domain name to the name servers of the new hosting company in advance of moving any other services, this is commonly referred to as the DNS.
DNS is usually handled by the same company that handles either website or email hosting or both. It is however technical independent and is a service that can be handled by different companies.
DNS is where the change is made when a website is switched from one hosting provider to another.
We suggest changing the DNS to be hosted by the new provider but set the DNS records to continue to point all services at the existing hosting service provider. Once the DNS records are hosted by the new provider, change the TTL (Time To Live) attribute to reduce it from the standard 24 hours to 10 minutes. This allows us to make changes between providers in as little as 10 minutes once the services are ready to be migrated. This is a big improvement on the standard 24 hours since the level of disruption is greatly minimized and the risk of users being spread between old and new sites is so much lower.
We first need to make sure we have an accurate copy of the records from the existing host. The best way to do this is to request a copy of the records from the current host or DNS provider. If this is not possible, with a reasonable knowledge of the services in use on the domain name, it is usually possible to collect most of the necessary information that you need using tools such as dig or nslookup.
Once DNS migration has been initiated we have approximately 24-48 hours before the domain can be redelegated to the new hosting providers name servers. This will give us ample time to move the content across to the new servers. There are essentially two ways this can be completed depending on what information we have. If you have FTP / SSH details then you will be able to log in and copy the files across. Important things to note:
- Databases? Make sure a dump is taken and saved in the home directory
- Provided you have SSH access, the easiest way to copy the content across is to tar up the entire home directory and then SCP it across.
A simple way of copying an entire website if you have FTP access is using LFTP. Login to the server the account is on as root and:
This will mirror the entire contents of the website into your current folder. You still need to manually copy any databases across.
Once the website has been copied test it on the temporary URL (as provided in the introductory email) for the hosting account setup and compare against original website to ensure everything is working correctly. If anything is not working, make sure it is fixed at this stage.
It is important that you confirm with the new hosting provider that you have completed your testing of the website.
Assuming that all email services are to be migrated, a full list of email addresses that are required must be provided to your hosting company. If mail services are remaining with the existing host, or they are already handled externally it is important that you let your hosting company know.
Once they have been provided your web host should supply you with new username and passwords.
Note that if email services are to be migrated in most cases you will be changing the username and password details for email services. This change is the one that will have the greatest effect on the end user of the hosting services and it's important that it is communicated properly. If peoples email breaks these days, it's often more disruptive to their work than cutting of their telephone.
We've found that the best way to ensure no email is lost in the migration process is to leave the existing configuration in place, so that the mail client continues to check the old mail server, then add a new profile that checks the new mail server concurrently. This should usually be left in place for up to 7 days after the change over. It will ensure that any mail that still does make its way to the old location will be collected.
Once everything has been checked and rechecked we can switch the site across our servers for web and email hosting (by switching the DNS).
You should contact your hosting provider to confirm a time to make the change.
If the website uses a database it may be necessary to complete a final synchronization of database immediately prior to changing the DNS.
That's it, you're all done. You site migration should be complete and all traffic flows to the new host with a minimum of disruption.