Moving A Website To A New Host, Server Guide

Martin Brinkmann
Jul 26, 2011
Updated • Dec 5, 2012
Development
|
7

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:

  • Old and new ftp server logins.
  • CPanel or web hosting logins from both the old and new web host.
  • MySQL logins, MySQL user and database information.
  • Website admin interface logins.
  • Logins for the old and new web hosting company.

This is the step by step guide on how to move the site to a new server:

Download all data

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.

Setup the new hosting account

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.

Upload the data

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.

Hosts File Changes, Testing

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.

Switch Nameservers

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.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. Anthony said on October 25, 2012 at 1:49 am
    Reply

    Good write up.

    I’ve done this before with my personals sites but I’m not hosting a few business sites for companies and I can’t afford a mishap.

    Your post cleared up a few unanswered questions I had about the migration.

    Thanks!!!!

    1. Anthony said on October 25, 2012 at 1:49 am
      Reply

      Good write up.

      I’ve done this before with my personals sites but I’m now hosting a few business sites for companies and I can’t afford a mishap.

      Your post cleared up a few unanswered questions I had about the migration.

      Thanks!!!!

  2. Edward said on November 6, 2011 at 4:52 am
    Reply

    you have given a good guide, very well.

  3. Automatic Website Backup said on July 26, 2011 at 8:25 pm
    Reply

    Good article – I would just add a word of advice about DNS propagation. If possible, I’d move your DNS over to somewhere which allows you to change the TTL of your zone. Before you want to swap you host from old to new, set the TTL of the zone really low.

    Wait for that TTL change to propagate, then do a final backup/restore of your database (from old to new) and switch the A records over to the new host. This will give you a much faster flick-over than waiting for average propagation (which can take hours, as you say).

    1. Martin Brinkmann said on July 26, 2011 at 10:11 pm
      Reply

      That’s a good tip, even though most TTL are set to 60 minutes. The lowest at Godaddy is 30 minutes. Are there DNS providers with even lower TTL settings?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.