How to Migrate a cPanel Server Without Downtime: Complete WHM Guide

Priya

Content Writer & Researcher

Last Updated: 3 October 2026
How to Migrate a cPanel Server Without Downtime: Complete WHM Guide
πŸ–₯️

Need to Migrate Your cPanel Server? We Handle It End-to-End

CloudHouse's migration specialists move cPanel servers with zero downtime for hosting companies in the US, UK, Canada, and Europe. Get a migration plan today.

πŸ–₯️12,400+PCs Fixed
⭐4.9β˜…Google Rating
⚑<15 minAvg. Response
πŸ›‘οΈISO 27001Certified

Migrating a cPanel server to a new host is one of the highest-risk operations a hosting company performs. Do it wrong and you get hours of downtime, corrupt databases, broken email, and angry clients. Do it right β€” with the correct sequence of WHM tools, DNS timing, and verification steps β€” and your clients never notice a thing. This guide walks through the complete cPanel-to-cPanel server migration process used by managed hosting companies worldwide.

Before You Start: The Pre-Migration Checklist

Rushing into a cPanel migration without preparation is the number one cause of downtime. Complete every item on this checklist before touching either server:

  • Confirm new server specs β€” CPU, RAM, and disk must meet or exceed the source server. Check with free -h and df -h on the source
  • Match cPanel and PHP versions β€” check source version: cat /usr/local/cpanel/version. Install the same major version on the destination or accept a brief compatibility window
  • Note all custom PHP extensions β€” run php -m on the source and replicate on destination via WHM β†’ EasyApache 4
  • Inventory all installed SSL certificates β€” especially AutoSSL-issued Let's Encrypt certs that will need re-issuance post-migration
  • Check source server disk usage β€” you need at least 20% free space on both servers for temporary migration files
  • Document all WHM custom configurations β€” MySQL my.cnf tuning, Apache limits, CSF firewall rules, cron jobs in /etc/cron.d
  • Notify clients of the maintenance window β€” even a zero-downtime migration benefits from a 30-minute heads-up

πŸ’‘ None of these worked? Skip the guesswork.

Get Expert Help β†’

Method 1: WHM Account Transfer (Recommended for Full Server Migrations)

WHM's built-in Transfer Tool is the safest way to migrate cPanel accounts between servers. It handles file compression, database exports, DNS zone transfers, and email migration automatically.

1Enable passwordless SSH from destination to source

On the destination server, generate an SSH key and copy it to the source:

ssh-keygen -t ed25519 -f /root/.ssh/migration_key -N ""
ssh-copy-id -i /root/.ssh/migration_key.pub root@SOURCE_SERVER_IP

Test the connection: ssh -i /root/.ssh/migration_key root@SOURCE_SERVER_IP "hostname"

2Run the WHM Transfer Tool

On the destination server, go to WHM β†’ Transfer Tool β†’ Copy Multiple Accounts/Packages from Another Server. Enter:

  • Source server IP
  • Root SSH credentials or the migration key path
  • Select accounts to transfer (or select all)
  • Set compression to 1 (fastest) if your servers are on a fast network link
3Monitor the transfer log
tail -f /usr/local/cpanel/logs/transfer_session/latest

Watch for Error lines. Most common issues: MySQL permission errors, accounts with very large mail directories, and symlinked directories that the transfer tool cannot handle.

4Verify each account post-transfer
# Check account exists on destination
whmapi1 listaccts | grep username

# Verify database count matches
mysql -e "SELECT schema_name FROM information_schema.schemata WHERE schema_name LIKE 'username%';"

# Check email accounts
whmapi1 list_pops_for_domains domain=example.com
1Sync home directories
rsync -avz --progress --exclude='*/tmp/*' --exclude='*/cache/*'   root@SOURCE_IP:/home/username/ /home/username/
2Export and import all databases for the account
# On source server β€” export
mysqldump --single-transaction --routines --triggers   --databases $(mysql -N -e "SHOW DATABASES LIKE 'username%';")   > /tmp/username_databases.sql

# Transfer the dump
rsync -avz root@SOURCE_IP:/tmp/username_databases.sql /tmp/

# On destination β€” import
mysql < /tmp/username_databases.sql
3Recreate database users and grants
# On source β€” export grants
mysql -N -e "SELECT CONCAT('SHOW GRANTS FOR ''', user, '''@''', host, ''';')   FROM mysql.user WHERE user LIKE 'username%';" | mysql -N |   sed 's/$/;/' > /tmp/username_grants.sql

# Import on destination
mysql < /tmp/username_grants.sql
mysql -e "FLUSH PRIVILEGES;"
1Sync Maildir before DNS cutover
rsync -avz --delete   root@SOURCE_IP:/home/username/mail/ /home/username/mail/
2Run a final rsync immediately before DNS change

The final rsync catches any messages that arrived during the migration window. Run it again 5 minutes before you change DNS β€” this minimises the gap.

3Set the old server to forward incoming email temporarily

In WHM on the source server β†’ Exim Configuration Manager β†’ Advanced Editor, add a router before the main local delivery router to forward mail to the new server's IP for the 24-48 hour DNS propagation window.

1Lower TTL 48 hours before migration

In your authoritative DNS, set the TTL on all A records, MX records, and CNAME records to 300 seconds (5 minutes) at least 48 hours before migration day. This means DNS changes propagate globally within 5 minutes instead of 24 hours.

2Verify files match on both servers before switching
# Compare file counts
ssh root@SOURCE_IP "find /home/username/public_html -type f | wc -l"
find /home/username/public_html -type f | wc -l
3Point DNS to the new server IP

Update the A record for the domain and all subdomains. If using WHM's DNS cluster, update it on the nameserver directly.

4Test using a hosts file before going live

Before changing DNS, test every site on the new server by adding temporary entries to your local /etc/hosts (Linux/Mac) or C:\Windows\System32\drivers\etc\hosts (Windows):

NEW_SERVER_IP    example.com www.example.com

Load the site in your browser β€” if it works, DNS can safely be changed.

Post-Migration Verification Checklist

After DNS has propagated, run through every item before closing the migration ticket:

  • All websites load correctly β€” test the homepage, a logged-in page, and a form submission
  • SSL certificates are valid β€” run AutoSSL in WHM: whmapi1 start_autossl_check_for_all_users
  • Email sending and receiving works β€” send a test email from and to each domain
  • Cron jobs are running β€” check crontab -l -u username for each account
  • Database connections work β€” check WordPress wp-config.php, Magento env.php, etc.
  • Backup is configured on the new server β€” confirm WHM backup is running to the correct destination

Common cPanel Migration Errors and How to Fix Them

Error: "Account restoration failed: The account already exists"

A partial transfer left a broken account on the destination. Fix:

whmapi1 removeacct user=username killdns=1
# Then re-run the transfer

Error: MySQL databases not migrating

Check if the source MySQL root password is in /root/.my.cnf and accessible by the transfer tool. If using cPanel's transfer, also check: WHM β†’ SQL Services β†’ phpMyAdmin for any databases owned by system users that the transfer tool skips.

Error: WordPress site shows "Error establishing database connection" after migration

The database username in wp-config.php includes the cPanel username prefix (e.g., olduser_wpdb became newuser_wpdb after the transfer). Update wp-config.php with the correct credentials from the new server's MySQL grant tables.

When to Use a Managed Migration Service

DIY cPanel migrations work well for smaller setups. For production hosting companies with SLA obligations, consider professional migration support when:

  • You are moving more than 50 cPanel accounts at once
  • Any account has a database over 10GB
  • You need zero-downtime migration with email continuity guaranteed
  • You are migrating from a non-cPanel control panel (Plesk, DirectAdmin) to cPanel
  • Your clients are in regulated industries with strict data residency requirements

CloudHouse Technologies' server migration service handles the full migration lifecycle β€” pre-migration audit, account-by-account transfer, DNS cutover coordination, and 48-hour post-migration monitoring β€” for hosting companies across the US, UK, Canada, and Europe.

A successful cPanel server migration comes down to preparation, the right sequence of steps, and verifying everything before DNS changes go live. Lower your TTLs early, sync email before the cutover, and use WHM's Transfer Tool for the bulk of the work. If you are managing a large fleet of cPanel accounts or need migration support with an SLA guarantee, CloudHouse's migration specialists are available to handle the entire process for you.

Get the Free Linux Server Admin Cheatsheet (PDF)

Essential commands for server management, networking, and troubleshooting β€” all on one printable page.

Running Linux servers? Let us manage them for you.

Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response β€” so your servers stay up and your team stays focused.

  • Proactive OS patching and security updates
  • 24Γ—7 monitoring with instant alerting
  • Backup configuration and disaster recovery
  • Dedicated Linux engineers on call
See Pricing Plans β†’

What our customers say

β€œOur production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

Arun S.

CTO, SaaS Startup

β€œThey migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

Deepak N.

DevOps Lead

Frequently Asked Questions

It depends on total data volume. A server with 50 accounts and 100GB of data typically takes 4-8 hours for the file and database transfer using WHM's Transfer Tool. DNS propagation adds another 5-30 minutes if TTLs were lowered in advance. Plan for a total window of 6-12 hours for a medium-sized cPanel server.

Need this done for you?

Server Migration Service

Move Linux and Windows servers with zero-downtime planning.

Learn more

Book your free 15-minute diagnosis

A certified technician will call you back within 15 minutes during business hours.

Share this article

Leave a Comment

Comments (0)

Loading comments...