Migrating a website means you’re moving it from one server to another. It may happen when you upgrade the physical servers in your office, move from your private servers to a virtual host or switch cloud web hosting services. However, the general process of migrating a website is the same in all of these cases. Let’s review how to migrate a website in 6 simple steps.
Backup Everything
Backup your critical files, such as HTML files and databases. This should be done before you start looking for a new web host, since you may forget to back things up during a migration and risk losing everything. Saving your website files to a flash drive or local PC also ensures that you have access to it if your current web server crashes or web host shuts you down.
Secure Your New Home
You can’t move to a new server without first securing the new address, so to speak. You need to pick a new web host and sign a contract so that you can move your existing website files to the new host. You may want to register your web domain with a third-party provider so that migrating the website name when you change hosts is easier.
Move Your Files and Databases
For static files like images and HTML pages, you simply copy the file structure and its contents to the new web host. WordPress is even easier to migrate since you only have to use the import/export function. Data migrations may take much more time and effort.
You’ll need to install your base applications like email servers and all application server software. If you have a dynamic site that runs off a database like MYSQL, set up the web apps first before you move the database file. You may need to tweak configuration files for it to work on the new server, which is why you wanted a backup before starting this process.
Test your new server environment
Test the migrated website on the new server. Did you copy all of the graphics files correctly? Are you missing any files? Do any links need to be updated? Check the 404 log in case there are dead links or missing files you need to restore so that the new site is functional. Check the firewall and security settings. Make sure all the ports work and page load times are as fast as you expect them to be.
Point the NS records to the new web server
You’ll probably get a new IP address with the new site. Your DNS record indicates where people looking for your domain should be sent. You’ll need to switch the website DNS records with the registrar to direct people to the new web host. If you skip this step, they may receive a 404 error or redirect by the DNS server that causes many to quit out of fear they’re being taken to a hacked site.
Note that it may take up to a full day for this switch to be fully propagated. Make sure it finishes before you tell your old web host to cancel your contract and shut down your old site. This ensures that there is zero downtime.
The DNS record TTL should be updated to refer to the new IP address, ideally as soon as you have it and several days before the move. You’ll need to update your MX records and any other files the email service provider needs if your email is hosted by a third party. If the email is hosted on a domain registrar, the @ record only needs to be pointed to the new IP address.
Tell Your Customers About the Change
Tell your customers that you’re switching webhosts so that they can update any stored bookmarks such as those who saved your website as an IP address instead of a domain name for faster load times. This means that if a web redirect occurs, they will wait it out and go to the new web host instead of bouncing away, indirectly hurting your search engine results page ranking. And they’ll know why the emails they sent during the transition may have bounced.
If you manage to follow all the steps above, you should be able to transfer your site to your new host without any issue. If these are too complicated for you, then you can always work with a programmer, but you should be able to do it on your own if your site isn’t heavy.