Pick our brains...

How To Transfer a Cpanel Account To a Different (WHM-Based) Server

This article assumes that you’ve got two servers:  one with a cpanel account (server X, with IP X.X.X.X), and another server that you’d like to transfer to (server Y, with IP Y.Y.Y.Y).

We’re also going to transfer the nameservers from server X to server Y.

DNS Setup:

  • Add A records to server X, registering the hostname of server Y.
  • Add A records to server X, registering “ns1” and “ns2”, pointing to server Y.

Full Cpanel Backup & Transfer:

  • Login to the cpanel account of server X.
  • Create a full backup of the account and wait for it to finish (may take some time, depending upon the size of the account).
  • Rsync the full backup (tar.gz) to the /home/ directory on server Y.
  • Once the backup file is transferred, login to WHM on server Y, and initiate a full restore.  If the backup file is in the /home/ directory, WHM should detect it, and allow you to choose an account to restore it too.

Prepare to Cutover the Nameservers:

  • Login to the WHM account of server Y.
  • Use the “Edit DNS Zone” tool to examine the dns records that have been imported from server X.  The main A record IP address for all domains should have been changed to Y.Y.Y.Y during the restore.  Ensure things look good and make sense.
  • With WHM, go to ‘WHM > Basic cPanel/WHM Setup” and scroll to the bottom.  Setup the new nameserver IP’s here.
  • Reference: https://forums.cpanel.net/f34/whm-noob-having-issue-ips-nameservers-168926.html
  • Now we should be ready to change the nameservers.  Login to the domain registrar, and change the nameservers from ns1.olddomain.com and ns2.olddomain.com, to ns1.newdomain.com and ns2.newdomain.com.
  • Clear your dns cache (on Windows command line, that’s “ipconfig /flushdns”).
  • Watch for the new changes in the dns information, with nslookup.