BuycPanel Blog

Latest news and updates

Migrating All of Your cPanel Accounts from One Server to Another (Part 1)

Posted by Alex on 02 02 2017.

When the time comes for you to change servers, you would usually have to perform several steps to get your website back up and running. One of the pre must-dos is to copy and migrate your accounts, main server IP address, and SSL certificates from your old server to your new server.

Step 1

Prior to transferring all of your accounts, IP addresses, and SSL certificates, you first have to get cPanel & WHM on the new server. While installing, choose a hostname as well as a main IP address for your new server. This should be different from the one you used before.

As for the hostname, nameservers, and shared IP addresses, make sure you choose the same ones you had on your old server. You have to do this since the system will set up the restored accounts’ DNS zone files with your previous settings. Just head to Home – Server Configuration – Basic cPanel & WHM Setup in your WHM portal to perform this step.

Step 2

Next, just have all the accounts copied over to your new server. Just in case you do not have an SNI-capable OS, have all the SSL certificates copied before swapping servers. You will find these in the directory with the /etc/ssl/ name.

After installation of cPanel & WHM on the new server, copy all of the accounts from the old server to the new one. To have them moved from the old to the new one, just go to WHM’s Transfer Tool interface (Home – Transfers – Transfer Tool), and then follow the directions there.

Step 3

Before performing this step, check whether your old server is a DNS cluster member or not, and if so, delete all the DNS clusters using the DNS Cluster interface found in your WHM portal.

After this, you can already copy everything to the new server and then shut down and close the old one.

Step 4

After shutting down the old server, change the main IP address of your new server with the same one you used for your old server.

Do this through a local session command line, so you can perform changes, restart your network service, and still maintain a connection to your server. Follow these steps:

Using a text editor, open the file titled: /etc/sysconfig/network-scripts/ifcfg-eth0.

Look for the IPADDR and GATEWAY lines and edit them so you can enter your old server’s IP address and gateway in them.

Using a text editor, open the file named: /etc/ips.

Put in the primary IP address, gateway, and net mask to the file of your old server.