Back to tutorials
Tutorial

cPanel Account Migration Tutorial (2026): Move Shared Hosting Accounts Between Servers Without Breaking Anything

Step-by-step cPanel account migration tutorial for 2026. Move shared hosting accounts, email, and databases between servers with zero data loss.

By Anurag Singh
Updated on Aug 22, 2026
Category: Tutorial
Share article
cPanel Account Migration Tutorial (2026): Move Shared Hosting Accounts Between Servers Without Breaking Anything

Moving a single cPanel account is different from migrating a whole server. You're not touching WHM configs or reinstalling a control panel. Instead, you're packaging one customer's entire hosting footprint — files, databases, email, DNS zones, cron jobs — and dropping it onto another server intact. Get one step wrong and you'll be fielding tickets about missing emails or a WordPress site throwing 500 errors.

This tutorial covers the cPanel account migration workflow that resellers and admins actually use. It applies whether you're consolidating clients onto fewer boxes, upgrading to a bigger VPS, or leaving a provider behind for good.

When You Need a cPanel Account Migration (Not a Full Server Migration)

A full server migration moves everything: WHM settings, all accounts, SSL certs, firewall rules. An account migration is narrower. You'll want it when:

  • You're consolidating a handful of low-traffic accounts onto a shared box
  • A single client is outgrowing shared hosting and needs their own VPS hosting plan
  • You're onboarding a client who's leaving another host and only sending you their cPanel backup
  • You need to rebalance disk or CPU load across multiple servers in a reseller fleet

Moving every account on the box? Use a full server migration tutorial approach instead. It's faster at scale than doing accounts one at a time.

Pre-Migration Checklist

Do this before you touch anything. Skipped prep is where most migrations go sideways.

  • Confirm both source and destination servers run compatible cPanel versions (check via /usr/local/cpanel/cpanel -V)
  • Verify the destination has enough disk quota free — check with df -h and compare against the account's current usage
  • Note the account's current PHP version (Multi-PHP Manager in WHM) so you can match it post-migration
  • Record DNS records currently in use, especially MX records and any custom TXT records for SPF/DKIM
  • Confirm the account isn't mid-cron-job or running a large mail queue — check mailq before transfer
  • Take a manual backup as a fallback, even if WHM Transfer Tool does one automatically

If your backup routine isn't solid, fix that first. Our WHM backup configuration tutorial covers scheduling and storage so you're never migrating without a safety net.

Method 1: WHM Transfer Tool (Server-to-Server, Both cPanel)

This is the cleanest path when both source and destination run cPanel/WHM and you have root access to both.

Step 1 — Set up API access on the source server. In WHM on the destination server, go to Transfers > Copy an Account from Another Server. You'll need root credentials or an API token from the source.

Generate an API token on the source instead of using the raw root password:

whmapi1 api_token_create token_name=migration_token acl-1=all

Step 2 — Run the transfer. In WHM > Transfers > Copy an Account, enter:

  • Source server hostname or IP
  • Remote root username and the API token
  • The account username to pull
  • Whether to preserve the original IP mapping or reassign

WHM handles the pkgacct backup on the source, transfers it, and restores it on the destination automatically. For a single account this usually takes 5–20 minutes depending on mailbox size.

Step 3 — Monitor progress. WHM shows a live log. Watch for warnings about missing PHP extensions or DNS zone conflicts. They're easier to fix mid-transfer than after the fact.

Method 2: Manual pkgacct Transfer (More Control, More Steps)

Use this when you need to review the backup before restoring, or when API access between servers isn't available.

On the source server, generate a full account backup:

/scripts/pkgacct username /home/backups

This creates a compressed archive like cpmove-username.tar.gz containing the home directory, databases, email, DNS zone file, and account metadata.

Transfer the archive to the destination server via SFTP or rsync:

scp /home/backups/cpmove-username.tar.gz root@destination-ip:/home/

Not comfortable managing raw SSH file transfers yet? Our SFTP setup tutorial covers locking down transfers with keys instead of passwords.

On the destination server, restore the account:

/scripts/restorepkg /home/cpmove-username.tar.gz

Restorepkg recreates the cPanel user, rebuilds databases, and reinstalls the mail configuration. It also restores the DNS zone if you're transferring DNS too (see the caveat below).

Handling Email During Migration

Email is where migrations quietly break. A few rules:

  • Don't cut over MX records until mail is confirmed working on the new server. Test by sending to a throwaway address first.
  • Check that DKIM/SPF records match the new server's mail configuration. pkgacct transfers mailbox data but not always the exact DNS TXT records if DNS is hosted externally.
  • Reduce MX TTL to 300 seconds 24-48 hours before cutover so the change propagates fast once you flip it.
  • Run a queue check post-migration with mailq on the new server to confirm nothing's stuck.

If bounces or authentication failures show up after the move, work through the email bounce troubleshooting tutorial. Most 550/554 rejections after a move trace back to mismatched SPF or a cold sending IP.

DNS Cutover: The Part People Rush

Don't just change the A record and walk away. Do it in this order:

  1. Confirm the site loads correctly on the destination server using its IP directly, or by editing your local /etc/hosts file to preview it
  2. Verify SSL is working on the destination before cutover — a mismatched or expired cert here means instant HTTPS errors for visitors
  3. Lower the A record TTL to 300 seconds a day in advance
  4. Update the A record to point to the new server
  5. Watch propagation with dig +short domain.com from multiple locations
  6. Once fully propagated, decommission the old account — don't delete it same-day in case you need to roll back

If propagation seems stuck or users report inconsistent results, the DNS propagation troubleshooting tutorial walks through the exact diagnostic steps, including checking resolver cache and stale NS delegation.

Post-Migration Verification Checklist

  • Site loads over HTTPS with no mixed-content warnings
  • Database connections work — check wp-config.php or equivalent config for correct DB host
  • Cron jobs are present in the new account (WHM > List Crons, or crontab -l as the user)
  • File permissions match expectations, especially for WordPress uploads folders (755 for dirs, 644 for files)
  • PHP version matches the original — check via php -v or WHM's MultiPHP Manager
  • Email sends and receives correctly from both webmail and any configured client
  • SSL auto-renewal is functioning — verify with AutoSSL status in WHM

If AutoSSL fails to reissue on the new server, that's almost always a DCV validation problem tied to DNS not being fully propagated yet. The cPanel AutoSSL troubleshooting tutorial has the fix.

Common Migration Pitfalls

  • Ignoring disk quota mismatches. If the destination account has a smaller quota than actual usage, restorepkg still succeeds — but the account gets locked over quota immediately.
  • Forgetting addon domains and subdomains. pkgacct includes them, but double-check they resolve correctly post-move. DNS zones sometimes need manual review.
  • Not testing databases before cutover. A restored MySQL dump can silently fail on character set mismatches between older and newer MySQL/MariaDB versions.
  • Skipping the rollback window. Keep the source account live and untouched for at least 48 hours after cutover.

Running low on disk or juggling too many accounts on one box? HostMyCode's managed VPS hosting gives you dedicated resources and a team that handles cPanel maintenance for you. Resellers scaling past shared hosting limits can also check our reseller hosting plans, built for exactly this kind of account consolidation.

Frequently Asked Questions

How long does a cPanel account migration take?

For accounts under 5GB with modest mail volume, expect 10-30 minutes using WHM's Transfer Tool. Large mailboxes or accounts with tens of thousands of small files (common with caching plugins) can take an hour or more.

Will my SSL certificate transfer automatically?

AutoSSL certificates don't transfer directly — the new server needs to reissue them once DNS points there. Custom-purchased SSL certificates and keys do transfer as part of the pkgacct backup and get restored automatically.

Can I migrate a cPanel account to a server running Plesk or DirectAdmin?

Not directly — pkgacct and restorepkg are cPanel-specific formats. You'd need a manual migration: export files via SFTP, dump databases separately, and recreate DNS/email settings on the target panel by hand.

What happens to cron jobs during migration?

Standard user cron jobs are included in the pkgacct backup and restored automatically. Verify them after migration, since paths inside the cron commands sometimes still reference the old server's directory structure.

Do I need to update nameservers for a single account migration?

No — if the account keeps the same domain and you're only changing the A record, nameservers stay the same. You only touch nameservers if you're also moving DNS hosting to a different provider.

cPanel Account Migration Tutorial (2026): Move Shared Hosting Accounts Between Servers Without Breaking Anything | HostMyCode