How to Move a cPanel Account to a New VPS in 2026

What you should do before you move the cPanel account to new VPS
If you need to move cPanel account to new VPS, handle the migration in three stages: prepare the destination server, copy the account with WHM, then verify the site before you switch DNS. That order keeps you out of lockout territory and leaves you a clear rollback path.
This guide assumes you are moving one existing cPanel account to a fresh Hostperl VPS. If you are still choosing the destination server, a Hostperl VPS gives you a straightforward place to run cPanel, DNS, and testing. For account operations and future reseller work, it also helps to read How to Choose cPanel, Plesk, or DirectAdmin in 2026 before you lock in the control panel.
Keep the old server online until the new copy passes a real browser test. The transfer is not finished when WHM says it is done. You are finished when the account serves pages, mail routes correctly, and the database works from the new host.
1) Connect to the destination VPS and check the operating system
On your local computer
ssh root@203.0.113.10203.0.113.10 is a reserved documentation example. Replace it with the real public IP for your Hostperl VPS.
If your provider gave you a default non-root SSH user, use that account instead after you verify the login method.
On the VPS as root
cat /etc/os-releaseThis tells you whether the server is Ubuntu, Debian, AlmaLinux, or Rocky Linux. cPanel supports a narrower set of operating systems than a standard VPS setup, so confirm the OS before you continue.
2) Finish the base VPS setup before installing cPanel
Before you move the cPanel account to new VPS, the destination server needs updates, a hostname, time sync, and a non-root admin path for emergency access. If you want the full first-login sequence, Hostperl’s Initial VPS Setup on Ubuntu and AlmaLinux in 2026 and Create a Non-Root Admin User on Ubuntu and AlmaLinux walk through the same early checks in more depth.
On the VPS as root
Ubuntu and Debian
apt update
apt -y upgrade
apt -y install curl wget vim chrony sudo ufwThis refreshes packages and installs a text editor, time sync, and a firewall. After that, set a hostname if the server still uses a placeholder name.
hostnamectl set-hostname server.example.com
systemctl enable --now chronyOn the VPS as root
AlmaLinux and Rocky Linux
dnf -y update
dnf -y install curl wget vim chrony sudo firewalldhostnamectl set-hostname server.example.com
systemctl enable --now chronyd
systemctl enable --now firewalldFor cPanel migrations, the right VPS size matters more than marketing labels. If you are still deciding between shared hosting, VPS, or a larger environment, Hostperl’s panel comparison guide and managed VPS hosting page help you set realistic expectations for RAM, NVMe storage, and support scope.
3) Install and open the basic firewall first
Open only the ports you need before you touch migration traffic. That keeps the server closed off on the default panel ports until you are ready.
On the VPS as root
Ubuntu and Debian with UFW
ufw allow OpenSSH
ufw allow 2087/tcp
ufw allow 2086/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status verboseUFW should report the rules as active. Port 2087 is WHM over TLS, and 2086 is the insecure legacy WHM port; you should only keep 2086 open briefly while testing.
AlmaLinux and Rocky Linux with firewalld
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-port=2087/tcp
firewall-cmd --permanent --add-port=2086/tcp
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
firewall-cmd --list-allIf SELinux is enforcing, leave it that way unless a specific installer step tells you otherwise. cPanel has its own documented installation path and will adjust services as needed, but you should still avoid broad security exceptions.
4) Install WHM/cPanel on the destination server
cPanel installation takes long enough that you want a clean shell session and enough disk space. Make sure the server is blank enough for the panel install, then run the installer from /home.
On the VPS as root
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latestThe installer can take a while. When it finishes, you should be able to reach WHM on https://203.0.113.10:2087 using the root password. Replace 203.0.113.10 with your server’s real IP.
For a fresh-panel walkthrough that starts from a clean VPS, Hostperl also keeps a dedicated How to Set Up cPanel on a Fresh VPS in 2026 guide. Use that if you need a separate installation reference before migrating customer data.
5) Prepare the source account for transfer
On the old server, freeze content briefly if the site changes often. For WordPress or ecommerce stores, put the site in maintenance mode or stop scheduled imports so your final sync is smaller.
If email is part of the account, note the mailboxes, forwarders, and DNS records before you begin. You will want those details later when you test deliverability and mail routing. Hostperl’s DMARC, SPF, and DKIM for Better Email Deliverability article is a good companion read if the account sends transactional or customer email.
6) Transfer the cPanel account with WHM
WHM’s transfer tool is the cleanest route for a direct account move. It preserves the account structure, databases, DNS zone, and mail setup more reliably than piecing files together by hand.
On the destination server in WHM
- Log in to WHM as root.
- Open Transfers > Transfer Tool.
- Enter the source server IP or hostname.
- Authenticate with root SSH credentials for the old server.
- Select the cPanel account you want to move.
- Review the package, DNS, and mailbox options.
- Start the transfer.
When WHM offers to copy the account’s DNS zone, accept it if the destination server will host DNS temporarily or permanently. If DNS stays external, still copy the zone so you can compare records after the move.
What to expect: WHM should show a successful completion message and list the account as transferred. If a database is large, the copy phase may take longer than the file phase.
7) Verify the account on the new VPS before changing DNS
Do not point the live domain at the new VPS until the account serves correctly on the destination. Test it first by editing your local hosts file or by using the server preview in WHM.
On your local computer
ping 203.0.113.10That confirms the new server is reachable. Then test the site with a browser against the preview URL or the temporary hostname WHM provides. If the site loads, check a login, a contact form, and a checkout flow if one exists.
On the VPS as root
systemctl status httpd
systemctl status nginx
systemctl status mariadbcPanel may use Apache, Nginx as a front-end, or both, depending on the stack. Only the services your server actually uses should be active. If one is inactive, check the transfer log before you restart anything.
8) Check logs, ports, and account files
When a migration looks right but still behaves oddly, logs usually explain why. Start with the transfer logs in WHM, then confirm the account files and listening ports on the server.
On the VPS as root
ss -tulpn | grep -E ':(80|443|2087|2086)'
ls -lah /home
tail -n 50 /usr/local/cpanel/logs/error_logYou should see the expected web and panel ports listening, the migrated home directory present, and no fatal cPanel errors in the log tail. If the account uses PHP-FPM, also inspect the site’s Apache and PHP logs in the account’s own log path from cPanel.
For sites that rely on PHP apps, Hostperl’s WordPress installation guide and WordPress staging migration guide are useful if the transferred account includes a WordPress site that will need staging or cleanup after the move.
9) Update DNS carefully and keep rollback in mind
Once the new server is verified, update the domain’s A record to the new VPS IP. If the zone is hosted on the account, change it in WHM. If DNS is external, update it at the registrar or DNS provider.
Lower the TTL before the migration if you can. That shortens propagation time and makes rollback easier if something unexpected appears after the cutover.
On your local computer
dig example.com A +short
nslookup example.comAfter the switch, you should see the new IP. Some resolvers lag behind, so test from more than one network if you can.
10) Turn on SSL and mail checks after cutover
If the site uses HTTPS, renew or issue a certificate on the new server after DNS points across. In WHM, use the SSL/TLS or AutoSSL tools for the account. Then visit the site over HTTPS and confirm the certificate matches the domain.
For mail, confirm SPF, DKIM, and DMARC still point at the right server or mail service. If the account sends outbound email from the VPS, run a test message to an external mailbox and inspect the headers. If you need the broader deliverability sequence, Hostperl’s email authentication guide is the right follow-up.
11) Final verification checklist from server and client
On the VPS as root
whmapi1 accountsummary user=username
systemctl is-active httpd
systemctl is-active mariadb
journalctl -u httpd --since "30 min ago"Replace username with the migrated cPanel account name. You want the account summary to return details, service checks to show active, and the journal to stay free of repeated failures.
On your local computer
curl -I https://example.com
curl -s https://example.com | headThe first command should return an HTTP 200 or a clean redirect to HTTPS. The second should return HTML from the migrated site, not a default Apache or cPanel placeholder page.
Also send one real smoke test: submit a contact form, place a test order if ecommerce is involved, or log into the application dashboard. That catches DNS, PHP, database, and mail issues that simple HTTP checks miss.
Troubleshooting the most common migration problems
WHM transfer stalls
tail -f /usr/local/cpanel/logs/transfer_sessions/*If the log shows SSH, quota, or disk errors, correct those on the source or destination server and rerun the transfer.
Site loads on the server but not publicly
dig example.com A +short
firewall-cmd --list-allFor external DNS, the old A record may still be cached. If the firewall is active, make sure 80 and 443 are open. Add the rule before removing the old one so you do not lock yourself out.
Database errors after cutover
mysql -e "SHOW DATABASES;"
tail -n 50 /var/lib/mysql/*.errIf the database is missing or the password changed, recheck the transferred account details and compare them with the application’s configuration file inside the cPanel home directory.
Mail stops arriving
exim -bp
postqueue -pQueued mail, stale MX records, or a missing SPF/DKIM update usually explain the failure. Correct the DNS records, then re-test with a single message before you move on.
If you are planning to move cPanel account to new VPS for a live client, Hostperl can help you choose a VPS size that fits the account, the database, and your mail volume. Start with managed VPS hosting or review How to Set Up cPanel on a Fresh VPS in 2026 before the migration window.
For agencies and small businesses, the real value is less downtime, a cleaner handover, and support that can help when a mailbox, SSL certificate, or DNS record does not behave after cutover.
FAQ
Can I move a cPanel account without downtime?
Usually yes, if you copy the account first, verify it on the new VPS, then switch DNS during a quiet window. Mail and form submissions may still overlap briefly because of DNS caching.
Should I move the DNS zone with the account?
Copy the zone unless you intentionally use external DNS. Even with external DNS, having the zone on the new server makes comparison and troubleshooting easier.
What if the old and new servers use different PHP versions?
Check the application’s PHP requirements before cutover. Many migration issues come from a version mismatch rather than the account transfer itself.
How long should I keep the old server online?
Keep it online until the new site works, mail is confirmed, and you have confirmed that any delayed DNS traffic has drained away. For most small sites, that means at least 24 to 48 hours.
Summary: a clean migration is mostly about sequence. Prepare the destination, transfer the account, verify the site, then move DNS and certificates only after the new VPS proves itself.
