How to migrate some sites or an entire server without downtime

cPanel makes it very easy to migrate between servers. If done properly, most likely there won’t be any downtime.

In this tutorial, we’ll break it down into 3 parts

A) Preparing the new server

  1. Setup the hostname. You can either use the same hostname as the old server or choose a new hostname
  2. Setup the nameservers. To make the transition seamless, it’s best to use the same nameservers as the old server.
  3. Install the same software, versions, modules, etc., that you have on the old server. Most importantly, the mysql & php version and modules should be the same as the old server.

B) Migrating the accounts

  1. Using the Transfer Tool link in WHM on the new server, enter the old server’s ip, ssh port, root password, then click Fetch Account List.
  2. On the next page, it will show all of the accounts. You can select all of the accounts you want to transfer. All of the options can be left as the defaults. Then click Copy

C) Once the transfer is complete

  1. Verify all of the accounts by checking the contents via FTP and testing them at the temporary url (http://SERVERIP/~username/). Please note that some sites will not display properly at the temporary url and will only work once the domain resolves to the new server.
  2. If everything is working properly on the new server, you can change the nameserver’s ip addresses at the domain registrar. For example, if all domains are using ns1.yourdomain.com and ns2.yourdomain.com, then change the ip addresses they point at to the new server’s ip addresses.
  3. Within about 24 hours all of the domains should be resolving to the new server. Over the next few days, test the sites again to make sure everything is working.

Since propagation & caching can take up to several days around the world for various reasons, keep testing the sites for a few more days. If no problems are detected, then you can temporarily power down the old server.

Continue to keep checking the sites over the next few more days. If you do not see any problems, then you can cancel the old server. Please remember that once the old server is cancelled, it is gone forever. So it’s important that you thoroughly check everything before cancelling the old server.