Log inSign up

Transfer cPanel accounts from an old server to a new one

Deploy a clean AlmaLinux 9 or Rocky Linux 9 server, install cPanel and WHM with the official latest script, and lower the DNS TTL of every domain a day ahead. Then open WHM, Transfers, Transfer Tool on the new server, connect to the old one as root over SSH, copy the accounts, test them through your hosts file and finally point DNS at the new address.

Topic: Control panels · Tested on: Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

What does a cPanel migration involve?

Each cPanel account bundles a home directory, web files, databases, mail boxes, DNS zone, certificates and settings. WHM can pack an account into one archive on the source and unpack it on the destination, preserving all of those parts. The Transfer Tool automates that over SSH for many accounts at once; pkgacct and restorepkg do the same by hand. What does not move by itself: the server IP, the cPanel licence, reverse DNS and anything you installed outside cPanel. Plan for those separately.

Typical reasons to move are a larger plan, a new city closer to visitors or a newer operating system. Our plans cannot be resized in place, so moving to bigger hardware always means a migration like this one; the larger plan tutorial covers the general idea.

How should the new server be prepared?

cPanel needs a completely fresh system. Deploy AlmaLinux 9 or Rocky Linux 9 on a plan with at least as much disk as the old server uses, plus headroom for the temporary archives. If you already experimented on the server, reinstall it from the Settings tab (the disk is erased and the new root password appears on Overview), as shown in reinstalling an image. Then set a fully qualified host name that is not one of the hosted domains and install cPanel:

sudo hostnamectl set-hostname server2.example.net
sudo dnf -y upgrade
sudo -i
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

The install runs for 30 to 60 minutes; use tmux. Afterwards confirm the version with /usr/local/cpanel/cpanel -V and open WHM at https://198.51.100.24:2087 as root to finish the initial setup.

How does cPanel licensing work on the new server?

cPanel licences are bound to the server IP address. A fresh install starts with a trial period, which is usually enough time for the transfer, but before it ends you need a licence for the new address from cPanel or one of its partners. If you are retiring the old server, ask whoever issued the existing licence to move it to the new IP after the migration is done. Check the licence status in WHM or with /usr/local/cpanel/cpkeyclt.

What should I do on the old server before copying?

Take stock first. List the accounts, their disk use and the cPanel version, and lower the TTL on every DNS zone to 300 seconds at least a day before the move so the switch propagates quickly:

/usr/local/cpanel/cpanel -V
whmapi1 listaccts | grep -E 'user:|domain:'
du -sh /home/* | sort -h | tail

The Transfer Tool needs SSH access to the source as root, or as a user with sudo rights. If root password login is disabled there, generate a key on the new server and add it to the old one:

ssh-keygen -t ed25519 -f /root/.ssh/transfer_key -N ''
ssh-copy-id -i /root/.ssh/transfer_key.pub root@203.0.113.50

Here 203.0.113.50 stands for the old server address.

How do I copy accounts with the Transfer Tool?

On the new server, open WHM, Transfers, Transfer Tool. Enter the source address 203.0.113.50, the SSH port, and root credentials or the private key you created, then scan the remote server. WHM lists packages, accounts and service settings. Tick the packages first (so plans exist), then the accounts. Leave Express Transfer off unless you want WHM to change DNS on the old server automatically; for a controlled switch you will change DNS yourself. Where the option is available, Live Transfer keeps the source serving traffic for the moved accounts while DNS catches up. Start the copy and watch the progress page; each account shows its own log, which you can open if a step fails. Large mail stores take the longest.

Can I move accounts without the Transfer Tool?

Yes. Package an account on the source, copy the archive and restore it on the destination. This is handy for single accounts or when the two servers cannot reach each other directly:

# old server
/usr/local/cpanel/scripts/pkgacct examplenet
rsync -avP /home/cpmove-examplenet.tar.gz root@198.51.100.24:/home/

# new server
/usr/local/cpanel/scripts/restorepkg /home/cpmove-examplenet.tar.gz
rm /home/cpmove-examplenet.tar.gz

The account name examplenet is a placeholder. Delete the archives afterwards; they contain every password hash and mail box of the account.

How do I test before switching DNS?

Trick your own computer into using the new server while the world still sees the old one. Add a line to your local hosts file (/etc/hosts on Linux and macOS):

198.51.100.24 example.net www.example.net

Browse the site, log in to its admin area, send a test form and sign in to webmail. Check PHP version selection in MultiPHP Manager and that databases connect. On the server, curl -I -H "Host: example.net" http://127.0.0.1 gives a quick response check. Remove the hosts line when you finish.

How do I switch over and catch late changes?

Pick a quiet hour. If content changed on the old server since the copy, run the transfer again for those accounts with the overwrite option, or ask site owners to pause edits for the window. Then update the A and AAAA records to 198.51.100.24 and 2001:db8:4f2a::24 (see DNS records), or change the name server addresses if the zones are hosted on cPanel itself. Once traffic arrives, run AutoSSL from WHM so every domain gets a valid certificate on the new server.

For mail, port 25 may not be open on your new server, so ask support with a ticket before the move, and request reverse DNS for server2.example.net in the same ticket. If direct delivery is not available, configure an authenticated relay on port 587 as in the SMTP relay guide. Keep the old server running for about a week so late mail and slow resolvers still land somewhere, then cancel it.

Which firewall settings matter on the new server?

Open web and mail ports to everyone and keep WHM to yourself. With firewalld on AlmaLinux or Rocky:

sudo firewall-cmd --permanent --add-service={http,https,smtp-submission,imaps,pop3s,dns}
sudo firewall-cmd --permanent --add-port=2083/tcp --add-port=2096/tcp
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.7" port port="2087" protocol="tcp" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

Enable cPHulk brute force protection in WHM as well. More patterns are in the firewalld guide.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4a few small accounts with light mail2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A4-8dozens of accounts and larger mail stores4 vCPU, 8 GB RAM, 180 GB NVMe$28.80/mo$86.40 for 3 months

Questions about Move cPanel accounts to a new server

Does the cPanel version need to match on both servers?

The destination should run the same or a newer version than the source. Restoring from a newer cPanel onto an older one is not supported.

Will passwords and mail survive the move?

Yes. The account archive includes password hashes, mail boxes, databases, cron jobs and DNS zones, so users sign in with the same passwords on the new server.

How long does a transfer take?

It depends mostly on total size. Small accounts move in minutes; accounts with tens of gigabytes of mail can take hours. Check du -sh /home/* on the source to estimate.

Can I move from an Ubuntu cPanel server to AlmaLinux?

Yes. Account archives are independent of the distribution, so the Transfer Tool and restorepkg work across supported systems as long as the destination version is not older.

What happens to the old IP address?

It stays with the old server. Sites on the new server use the new address, which is why DNS records and any IP-based allow lists must be updated.

Which plan should I choose for the new server?

Match or exceed the old server. A4-8 is a sensible size for a few dozen small accounts; check disk use first since cPanel and mail stores grow quickly.