How to Move All cPanel Accounts from One Server to Another

How to Move All cPanel Accounts from One Server to Another


This tutorial explains how to migrate your cPanel accounts, SSL certificates, and main server IP address from one server to another. Typically, you would do this when you need to replace your server.


This procedure assumes that your server’s IP addresses are portable, and that you can migrate them from the old server to the new server. If you use a third-party data center or hosting provider for your cPanel server, contact them to confirm that you can migrate your IP addresses.


Your websites will likely experience downtime during this process.

Migrate your cPanel accounts


Install cPanel & WHM on your new server

Before you transfer the accounts, install cPanel & WHM on your new server.

During the installation process, select a hostname and main IP address for the new server.


  • You must select a main IP address that is different from your old server.
  • You should, however, select the same hostname, shared IP address, and nameservers as your old server. This is important because the system configures the DNS zone files of restored accounts with those settings. You can do this in WHM’s Basic WebHost Manager Setup interface (Home >> Server Configuration >> Basic WebHost Manager Setup).


  • cPanel, Inc. automatically provides you with free 15-day trial license when you install cPanel & WHM on a new server. However, if the Trial License Interface shows that your IP address is not eligible for a trial license, contact Customer Service.
  • The migration process will transfer your permanent license to the new server.




Copy all accounts to the new server


If you do not use a SNI-capable operating system, be sure to copy all SSL certificates before you switch servers. SSL certificates and keys exist in the /etc/ssl/ directory.

After you install cPanel & WHM on your new server, copy each account from your old server to your new server. To move all of your accounts from one server to another, follow the steps listed in WHM’s Transfer Tool interface (Home >> Transfers >> Transfer Tool).


As of cPanel & WHM version 56, the Transfer Tool feature allows you to transfer the following service configurations:

  • Backups
  • cPanel & WHM
  • Database Server
  • Easy Apache
  • Exim
  • User Interface Themes



Shut down your old server


Before you begin Step 3, if your old server is a member of a DNS cluster, delete the DNS clusters in WHM’s DNS Cluster interface (Home >> Clusters >> DNS Cluster).

After you copy your accounts to the new server, you can shut down your old server.



Change the new server’s main IP address to the old server’s IP address

After you shut down your old server, change the new server’s main IP address to the IP address of your old server. Perform this action via the command line in a local session. A local session allows you to make changes, restart the network service, and stay connected to the server.

To change the server’s main IP address, perform the following steps:

  1. Open the /etc/sysconfig/network-scripts/ifcfg-eth0 file with a text editor.
  2. Edit the IPADDR and GATEWAY lines to use the IP address and gateway of your old server.
  3. Open the /etc/ips file with a text editor.
  4. Add your old server’s primary IP address, net mask, and gateway to the file.


    Remove the new server’s primary IP address from this file if it is present.

  5. Restart the network service with the following commands:
    • For CentOS, CloudLinux™, and Red Hat® Enterprise Linux (RHEL) 6 and earlier, and Amazon Linux, run the  service network restart  command.


      Amazon Linux always runs in a NAT configuration.


    • For CentOS, CloudLinux, and RHEL 7 and later, run the systemctl restart network command.
  6. Run the /scripts/mainipcheck command to add the IP address to the /var/cpanel/mainip file.
  7. Run the /scripts/fixetchosts command to add the IP address and hostname of your server to the /etc/hosts file.



Change the IP address of all accounts to the correct IP address

After you transfer the accounts to the new server, the system may have set the IP addresses of the accounts to the new server’s original main IP address. You must change each account’s IP address to the current IP address with WHM’s IP Migration Wizard interface (Home >> IP Functions >> IP Migration Wizard).



Join the new server to the DNS cluster


If your server is not a member of a DNS Cluster, skip ahead to Step 7.

To add the new server to the DNS cluster, perform the following steps:

  1. Navigate to WHM’s DNS Cluster interface (Home >> Clusters >> DNS Cluster).
  2. Select Enable DNS Clustering.
  3. Click Change.
  4. Click Return to Cluster Status.
  5. Select the server to add to the DNS cluster from the Add a new server to the cluster menu.
  6. Click Configure.



Reinstall all SSL certificates


Skip ahead to Step 8 if your server meets the following conditions:

  • The accounts on your server do not use SSL certificates from a Certificate Authority.
  • Both of your servers use an SNI-capable operating system.

To upload an existing SSL certificate to your server, perform the following steps:

  1. Navigate to WHM’s Install an SSL Certificate on a Domain interface (Home >> SSL/TLS >> Install an SSL Certificate on the Domain).
  2. Paste the certificate into the text box, or click Fetch to upload a *.crt file.
  3. Click Submit to install the certificate onto the server.



Confirm your cPanel license is valid

After you move all of your accounts to your new server, confirm that your cPanel license is valid.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.