Complete cPanel to DirectAdmin Migration Guide: Known Issues, Full Transfer Methods, and Single Account Conversion

This guide explains everything required to migrate accounts from cPanel to DirectAdmin, including known limitations, username/database compatibility issues, backup preparation, bulk transfers, single account conversions, and how to properly convert cPanel backups into DirectAdmin compatible formats. It also includes automation tips, rsync transfer methods, and post migration reseller reassignment.

cPanel to DirectAdmin migrationcpmove conversionDA restore

~3 min read • Updated Mar 4, 2026

1. Important Considerations Before Migrating from cPanel to DirectAdmin


1.1 Known Limitations


  • Mailman mailing lists are NOT converted to Majordomo.
  • You must generate the cpmove-user.tar.gz backup yourself for security reasons.
  • DirectAdmin strictly uses username_database and username_user formats.

Because cPanel sometimes shortens usernames due to length limits, DA may need to rename database users. Example warning:


WARNING! us_wordpress cannot be owned by user, renaming database user to user_wordpress

1.2 Additional Notes


  • Keep all cpmove-user.tar.gz files after restore for safety.
  • DirectAdmin and cPanel support different feature sets (e.g., DA supports nginx/OpenLiteSpeed, MySQL 8, rspamd; but NOT PostgreSQL or Ruby).
  • Max username length in DA is 16 characters (configurable in directadmin.conf).

To find the longest username on cPanel:


ls /var/cpanel/users | awk '{print length, $0}' | sort -nr | head -n1

1.3 Backup Filename Requirements


Valid format: cpmove-USERNAME.tar.gz


If your backups are named incorrectly, rename them:


Rename user.tar.gz files:


for i in `ls *.tar.gz | grep '^[A-Za-z0-9]*.tar.gz'`; do { mv -vf ${i} cpmove-${i}; }; done

Rename backup-..._user.tar.gz files:


for i in `ls backup-[0-9]*.*.tar.gz`; do { USERNAME=`echo $i | cut -d_ -f3 | cut -d'.' -f1`; mv -v $i cpmove-${USERNAME}.tar.gz; }; done

1.4 Missing Users in “Move Users Between Resellers”


Rebuild reseller user lists:


echo "action=cache&value=showallusers" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

1.5 If Resellers Were Not Restored First


All users will be assigned to admin. To reassign them:


cd /home/admin/all_backups
for i in `ls user*.tar.gz`; do {
  RESELLER=`echo $i | cut -d. -f2`
  USER=`echo $i | cut -d'.' -f3`
  /usr/local/directadmin/scripts/move_user_to_reseller.sh $USER admin $RESELLER
}; done

---

2. Full cPanel → DirectAdmin Migration (All Accounts)


2.1 Steps on the cPanel Server


Create backups for all users:


mkdir -p /home/all_backups
for user in `ls /var/cpanel/users/`; do {
  /scripts/pkgacct ${user} /home/all_backups
}; done

Transfer backups to DirectAdmin server:


rsync -avt --delete /home/all_backups/ root@your_directadmin_server.com:/home/admin/all_backups/

---

2.2 Steps on the DirectAdmin Server


Ensure correct ownership:


chown -R admin. /home/admin/all_backups

Restore all accounts:


Go to:


Admin Level → Admin Backup/Transfer

Select the directory /home/admin/all_backups and restore all accounts.


Done!


---

3. Low Space Alternative: Transfer Accounts One by One


3.1 Setup Passwordless SSH from cPanel → DirectAdmin


ssh-keygen

Copy /root/.ssh/id_rsa.pub to:


/root/.ssh/authorized_keys

3.2 Automated One by One Transfer


for user in `ls /var/cpanel/users/`; do {
  /scripts/pkgacct ${user} /home/all_backups
  rsync -avt /home/all_backups/cpmove-${user}.tar.gz \
    root@your_directadmin_server.com:/home/admin/all_backups/cpmove-${user}.tar.gz
  rm -f /home/all_backups/cpmove-${user}.tar.gz
}; done

---

4. Single Account Migration (cPanel → DirectAdmin)


4.1 Steps on the cPanel Server


Create backup:


/scripts/pkgacct USERNAME /home/user_backups

Transfer backup:


rsync -avt /home/user_backups/cpmove-USERNAME.tar.gz \
  root@your_directadmin_server.com:/home/admin/

---

4.2 Steps on the DirectAdmin Server


Convert cPanel backup to DirectAdmin format:


/usr/local/directadmin/shared/cpanel_to_da/cpanel_to_da.sh \
  /home/admin/cpmove-USERNAME.tar.gz \
  /home/admin/converted_user_backup/

Fix ownership:


chown -R admin:admin /home/admin/converted_user_backup

Restore via DirectAdmin panel:


Admin Level → Admin Backup/Transfer

Set the path to /home/admin/converted_user_backup and restore.


Done!


Written & researched by Dr. Shahin Siami