To migrate cPanel accounts to DirectAdmin you move website files, MySQL databases, mailboxes and DNS records onto the new server, then fix ownership and paths so DirectAdmin's services can read them. DirectAdmin includes a migration tool that reads a cPanel backup or pulls straight from the old server over SSH. This guide covers preparing both servers, running the import, and checking that mail and databases arrived intact.
Before you start
You need:
- DirectAdmin installed and licensed on the destination VPS. Panel licences come from the DirectAdmin vendor — check the vendor's site for current plans and activation. If DirectAdmin isn't installed yet, follow install DirectAdmin on AlmaLinux.
- Root SSH access on both machines. See connect to your Linux VPS with SSH if you're setting that up.
- A full backup of the cPanel server, plus a list of the domains, databases, mail accounts and cron jobs in scope.
- Roughly double the account's disk usage free on the destination.
Check free space before you start:
df -h /homeWarning: Do not move live DNS to the new server until the import and checks are finished. Migrate while the old server still answers for the domain, then switch DNS once files, databases and mail are confirmed.
Create a matching hosting package
The migration tool assigns each imported user to a hosting package. Build one first with the same quota, bandwidth, email and database limits as the cPanel account so nothing is cut short.
In DirectAdmin, go to Admin Level, open Packages, and create the package. Note its exact name — you'll select it during the import. The manual route is described in DirectAdmin: create a user and a hosting package.
Make a cPanel account backup
On the cPanel server, run pkgacct as root to produce a single migration file:
/usr/local/cpanel/scripts/pkgacct deploy /home/backupYou should end up with /home/backup/cpmove-deploy.tar.gz. Confirm it:
ls -lh /home/backupCopy it to the DirectAdmin server:
rsync -avz -e ssh /home/backup/cpmove-deploy.tar.gz root@203.0.113.10:/home/admin/migrations/Tip: Mail archives are usually the slowest part of a migration. Transfer them during a quiet period and keep the old server online until the DNS switch.
Run the cPanel to DirectAdmin migration
DirectAdmin's migration tool lives in the admin area. Newer builds list it as Site Migration; older ones expose it as a cPanel migration plugin. Menu labels change between versions, so confirm the current name in DirectAdmin's documentation for the version you run.
There are two ways to feed it data:
- From the backup file — point the tool at
/home/admin/migrations/cpmove-deploy.tar.gz, or upload the file through the interface. Choose the destination package and start the import. - From the live cPanel server over SSH — supply the old server's IP, root password and the account name. The tool pulls files, databases and mail in one pass.
The import can take minutes or hours depending on mailbox size. Don't close the browser tab while it runs: an interrupted session can leave a half-created user, which you then delete and redo.
Verify databases
Migrated databases normally keep their names, but DirectAdmin's MySQL administrator is not the same account as cPanel's. Its credentials sit in a config file:
cat /usr/local/directadmin/conf/mysql.conf
mysql -uda_admin -p -e "SHOW DATABASES;"Check tables and approximate row counts for an account database:
mysql -uda_admin -p -e "SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema='deploy_wp';"If a database is missing, move it by hand. Dump it on the old server:
mysqldump --single-transaction --routines --triggers deploy_wp > /home/deploy/deploy_wp.sqlThen load it on the new one:
mysql deploy_wp < /home/deploy/deploy_wp.sqlFinally make sure the application config (for example wp-config.php) uses the database user DirectAdmin created, and recreate that user in the DirectAdmin user panel if it wasn't mapped.
Verify mail
cPanel stores mailboxes under /home/user/mail/. Current DirectAdmin builds use /home/user/imap/domain/user/Maildir/, while older ones use mail/. Check which layout applies:
ls /home/deployIf messages are missing, sync the Maildir contents across:
rsync -avz -e ssh /home/deploy/mail/example.com/deploy/ \
root@203.0.113.10:/home/deploy/imap/example.com/deploy/Maildir/Warning: Stop Dovecot on the destination before the mail sync so messages delivered mid-c
