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

Related Articles

Email Client Configuration & Dovecot Quota/Monitoring Guide for DirectAdmin Users

This guide explains how to configure popular email clients (iPhone Mail, Thunderbird, Gmail POP/SMTP), enable Dovecot LMTP quota warnings, and check the last login time for all email accounts on a DirectAdmin server. It includes step by step instructions, recommended IMAP/SMTP settings, and useful administrative scripts.

Continue

Troubleshooting Dovecot in DirectAdmin – Fixing IMAP Errors, Authentication Issues, and SSL Certificate Checks

Dovecot is the IMAP/POP3 server used by DirectAdmin. Sometimes users encounter errors such as “Connection dropped by IMAP server” or “unknown user” during authentication. This guide explains how to fix corrupted Dovecot indexes, understand authentication logs, hide unnecessary warnings, and manually inspect SSL certificates on IMAP ports 143 and 993.

Continue

DNS Troubleshooting in DirectAdmin – When named is Running but Domains Do Not Resolve

Sometimes the named (BIND) service runs normally, yet DNS queries fail or domains do not resolve from outside. This guide provides a complete troubleshooting workflow for checking named listeners, firewall rules, named.conf configuration, DNS propagation issues, subdomain problems, resolv.conf errors, and common Apache/Nginx misconfigurations.

Continue

Managing DNS Records in DirectAdmin – Complete Practical Guide for Administrators

DirectAdmin provides a powerful DNS management system that allows administrators to control TTL values, create SRV records, enable DNSSEC, manage subdomain delegation, automate TLSA records, and perform mass DNS updates. This guide explains all essential DNS operations in DirectAdmin with real-world examples and best practices.

Continue

DNS and Nameservers in DirectAdmin – Complete, Practical, and Professional Guide

DNS is the backbone of the internet, responsible for translating domain names into IP addresses. DirectAdmin allows you to create private nameservers (ns1/ns2), manage DNS zones, configure DNS clustering, use external DNS, and troubleshoot common issues. This guide provides a complete, clear, and practical explanation of DNS concepts and their implementation in DirectAdmin.

Continue

CustomBuild in DirectAdmin – Complete Guide to Installation, Updates, Configuration, and Advanced Customization

CustomBuild is DirectAdmin’s primary software management system. It installs, updates, configures, and rebuilds essential services such as Apache, Nginx, PHP, MariaDB/MySQL, Exim, Dovecot, FTP servers, and more. Because most components are compiled from source, CustomBuild offers exceptional flexibility, fast access to new versions, and optimized performance.

Continue