You may know that I bought a website recently. One of the things that freaked me out in the early days of being a webmaster was moving a website to another host or server. Why? Because of all the things that could go wrong. Set the wrong nameservers for instance and your site won't be accessible for a period of time. The biggest concern by far was site downtime. That's bad for any business, and prolonged downtime could result in lost rankings in the search engines.
Over the years, I developed a technique on how to best move a website to a new server. I'm using it ever since and it has resulted in 0 downtime or difficulties when moving a site to a new host.
Here is the list of data and information that you need to get started:
This is the step by step guide on how to move the site to a new server:
My first step is always a full backup of all site data. This includes the web files and databases. I often connect to the ftp server and download the web files to my local computer, and use Cpanel or a comparable hosting panel to create the database backup. This step can take some time. But we can prepare the new hosting account in the meantime.
I start to configure the new hosting account while the data is downloading. This includes basic setup of the account, quotas, ftp login, MySQL database and user among other things. I do that to have the data at hand to proceed to the next step immediately after the data backup completes.
Once the downloads are finished I begin to upload the data to the new host. I use the same ftp client to upload the data to the new host, and Cpanel or phpMyAdmin to import the MySQL database.
I also modify the data if needed. This may include the new MySQL database information or paths in configuration files.
I edit the Hosts file on my system to point to the new server IP address. This is done for testing purposes. Remember that you cannot access the domain name on the new host at this point in time, since the nameservers are still pointing to the old hoster. Check out Work On Websites Before DNS Propagation for a detailed guide on how to change the Hosts file for that purpose.
Once the Hosts file has been changed, it is possible to access the site with its domain name on the new server. Just enter the domain name in your web browser to do that. I test the new site extensively, check that everything is displayed correctly and that no error messages show up. I also test the admin interface if available to make sure that it works as well. If you are unsure, ask a friend to take a look at the site to see if you have overlooked anything.
If the website passes all tests I open the domain hosting panel at the domain registrar and switch the nameservers so that they now point to the new web server instead of the old one. The propagation may take up to 48 hours to complete. I suggest you test the connection with proxies or virtual private networks for testing purposes.
I keep the data on the old domain name for at least a week or two. I also backup the downloaded data to have it at hand if I should need it.
It pays to monitor the traffic and web servers during the propagation phase to make sure that the process is fluent and without service interruption.
Have you ever moved a domain name to a new web hosting account? If so, tell us about your experience.
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.