Emergency server help: get in touch

Migrate DirectAdmin to cPanel: Complete 9-Step Migration Playbook

A complete playbook to move hosting accounts from DirectAdmin to cPanel & WHM: audit, what transfers and what does not, the Transfer Tool and pkgacct-da methods, PHP, mail, DNS cutover, delta sync, checks, rollback and a timeline.

Published Updated 16 min read

To migrate DirectAdmin to cPanel, you package each DirectAdmin user with cPanel’s migration scripts, restore the packages on a fresh cPanel & WHM server, fix what does not convert, sync the last changes and then move DNS. The WHM Transfer Tool supports DirectAdmin as a source and automates the packaging; the pkgacct-da script plus restorepkg does the same by hand. This playbook covers the audit, both methods, PHP, databases, mail, SSL, DNS, verification, rollback and a timeline you can hand to the team.

Short answer: Lower DNS TTLs two days ahead, then in WHM open Transfers » Transfer Tool, enter the DirectAdmin server’s IP and root credentials, scan it, select the users and start the transfer. Test each site through your hosts file, recreate what did not transfer (packages, resellers, mailing lists, custom DNS records, spam settings), run a final mail and database sync, then point DNS to the new server. Keep DirectAdmin running for two weeks as the rollback path.

Which method to use

MethodBest forNeedsProsCons
WHM Transfer ToolMost migrations, many accountsRoot SSH to DirectAdminPackages, copies and restores in one queue; logs per accountLarge accounts can time out; limited control per step
pkgacct-da + restorepkgSingle large accounts, retries, custom schedulingRoot SSH, disk space on both sidesFull control; can skip docroots and rsync them separatelyMore manual work
cPanel migration serviceTeams short on timeLicensed, freshly installed cPanel serverFree for DirectAdmin sources; done by cPanel staffScheduling; you still own DNS and testing
Manual (files, dumps, imapsync)No root on the sourceAccount-level access onlyWorks with any hostSlow; mail passwords must be reset

Whichever way you migrate DirectAdmin to cPanel, the audit, testing and DNS steps stay the same. We recommend the Transfer Tool for everything under a few gigabytes and pkgacct-da with a separate rsync of the web files for the largest accounts.

Prerequisites

  • Root access to both servers and SSH from the cPanel server to DirectAdmin.
  • A licensed, freshly installed cPanel & WHM server with no accounts yet, on a different main IP from the old server. See our guide on choosing a VPS for cPanel if you are still sizing it.
  • MySQL 5.7 or MariaDB 10.2 at minimum; in practice use a current MariaDB LTS that is equal to or newer than the source.
  • Free disk space on both servers greater than twice the largest account, plus 1 GB.
  • Perl 5.6.2 or later on both servers (every current distribution meets this).

Step 1: Audit the DirectAdmin server

An inventory before you migrate DirectAdmin to cPanel tells you what to rebuild and how long the copy takes. Run these on DirectAdmin as root:

# users and their domains
ls /usr/local/directadmin/data/users/
cat /usr/local/directadmin/data/users/alice/domains.list
# disk use: web files and mail
du -sh /home/*/domains /home/*/imap 2>/dev/null
# installed PHP versions and modes
grep -E '^php[1-4]_(release|mode)' /usr/local/directadmin/custombuild/options.conf
# database sizes in MB
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e "SELECT table_schema, ROUND(SUM(data_length+index_length)/1048576) AS mb FROM information_schema.tables GROUP BY table_schema ORDER BY mb DESC;"
# database users allowed from remote hosts
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e "SELECT User,Host FROM mysql.user WHERE Host NOT IN ('localhost','127.0.0.1','::1');"
# cron jobs per user
crontab -l -u alice

Record the results in a sheet:

ItemWhy it matters on cPanel
UsernamescPanel usernames must be 16 characters or fewer, lower-case letters and digits only, and cannot start with a digit or test; the first eight characters must be unique if you use databases
Resellers, packages, feature listsNot transferred; recreate them
PHP version and mode per domainInstall the same versions in EasyApache 4 first
Mailbox count and sizePlan the delta sync and the freeze window
Mailing lists, FTP users with _Not converted; recreate
Where DNS is hostedOn DirectAdmin itself, at the registrar or at Cloudflare; decides the cutover
Custom httpd or nginx configsNot transferred; rewrite as cPanel includes or .htaccess
Remote MySQL hostsAdd them in cPanel’s Remote Database Access

Step 2: Prepare the cPanel server

  1. Install the PHP versions found in the audit: WHM » Software » EasyApache 4, customise the profile and add ea-php81, ea-php82, ea-php83 and so on, with the extensions the sites use (intl, imagick, soap, sodium).
  2. Set the default PHP version and handler in WHM » Software » MultiPHP Manager.
  3. Create hosting packages and feature lists with the same names as on DirectAdmin, so you can assign them after the restore.
  4. Configure nameservers in WHM » Server Configuration » Basic WebHost Manager Setup and choose the AutoSSL provider in WHM » SSL/TLS » Manage AutoSSL.
  5. Match the web server stack: if DirectAdmin ran LiteSpeed, license LiteSpeed for cPanel; if it ran Apache or nginx with Apache, the default Apache setup is enough.
  6. Keep the default maildir mailbox format. The rsync delta method in Step 7 assumes maildir on both sides.

Step 3: Lower DNS TTLs

At least 48 hours before the cutover, set the TTL of the A, AAAA, MX and CNAME records of every domain to 300 seconds, wherever the zones are hosted. Also note the current NS records and glue records. Low TTLs make the switch fast and the rollback equally fast. If you migrate DirectAdmin to cPanel with DNS at Cloudflare and the records are proxied, visitors follow the new origin IP as soon as you change it; only unproxied records such as MX wait for the TTL.

What transfers and what does not

cPanel’s documentation for DirectAdmin migrations lists the exceptions. Plan to rebuild these items before you migrate DirectAdmin to cPanel in production:

ItemResult on cPanelAction
Web files, domains, subdomainsTransferred; extra domains become addon domainsCheck document roots in cPanel » Domains
Databases and database usersTransferredRe-add remote hosts; check app configs
Email accounts and passwordsTransferred with the password hashesTest logins
mbx mailboxes, zstd-compressed mailNot converted or not transferredUse imapsync for those mailboxes
DNS zonesRebuilt from cPanel zone templates, not copiedRe-add custom TXT, SRV, CAA, CNAME and external MX records
SpamAssassin settings and allow/deny listsNot transferredRecreate in cPanel » Spam Filters
PackagesNot transferred; accounts set to unlimitedAssign packages in WHM » Upgrade/Downgrade an Account
Feature listsNot transferred; default list used unless the same name existsCreate matching lists first
ResellersNot identifiedRecreate and change account ownership
Mailing lists (Majordomo)Not convertedRebuild on your list platform
FTP accounts with _ in the nameNot transferredRecreate with a new name
Forwarding-only and “No Hosting” domainsNot migratedConvert to hosted domains first, or recreate as redirects
Two-factor authenticationNot transferredUsers enrol again
Custom panel and server configurationNot transferredReplicate by hand

Per-account or bulk transfer

A bulk run is tempting, but when you migrate DirectAdmin to cPanel for paying customers, batches are safer:

  • Pilot: one small account with a CMS site, a database, several mailboxes and a cron job. It exercises every conversion path.
  • Batches: 10 to 20 ordinary accounts per run, grouped by the DNS provider so each batch has one cutover procedure.
  • Large accounts: one at a time with pkgacct-da, scheduled outside business hours.
  • Resellers: move a reseller’s customers together, then recreate the reseller and change ownership in one step.

Step 4a: Transfer with the WHM Transfer Tool

  1. In WHM go to Transfers » Transfer Tool.
  2. Enter the DirectAdmin server’s IP address or hostname, the SSH port and root as the login. Authenticate with the root password or an SSH key.
  3. Click Scan Remote Server. WHM connects over SSH, identifies the DirectAdmin server and lists its users.
  4. Select a pilot account first, then start the copy. WHM packages the user on DirectAdmin, copies the archive and restores it.
  5. Watch the session; afterwards open WHM » Transfers » Review Transfers and Restores for per-account logs and warnings.
  6. When the pilot passes the tests in Step 6, transfer the remaining accounts in batches.

Do not run upcp during a transfer, and do not start a transfer while an update is running.

Step 4b: Transfer with pkgacct-da and restorepkg

Use this for large or problem accounts. Download the current pkgacct-da script from the location given in cPanel’s migration documentation (check it first, as cPanel can move it), then run it on DirectAdmin:

cd /root
# confirm the current download URL in cPanel's migration docs before running
wget https://httpupdate.cpanel.net/cpanelsync/transfers_DEVEL/pkgacct/pkgacct-da
chmod +x pkgacct-da
./pkgacct-da alice

The script writes a cpmove-alice.tar.gz archive; its output shows the path. cPanel’s migration change log lists --skipdocroots and --skipbackups options for pkgacct-da: skip document roots for very large sites and copy them with rsync instead. Copy the archive to /home on the cPanel server and restore it:

rsync -avP /root/cpmove-alice.tar.gz root@cpanel.example.net:/home/
/usr/local/cpanel/scripts/restorepkg /home/cpmove-alice.tar.gz

If the DirectAdmin username breaks cPanel’s rules or is taken, restore it under a new name with --newuser, then update database prefixes in application configs. --ip=y assigns the next dedicated IP; without it the shared IP is used.

Step 5: Fix PHP, web server and application settings

PHP versions and handlers

DirectAdmincPanel equivalent
CustomBuild php1_release … php4_releaseEasyApache 4 packages ea-phpXY
Per-domain PHP version selectorcPanel » MultiPHP Manager (per domain)
php-fpm modePHP-FPM enabled in MultiPHP Manager
lsphp with LiteSpeedLiteSpeed Enterprise for cPanel
Custom PHP settings per domainMultiPHP INI Editor or .user.ini
CLI /usr/local/php82/bin/php/opt/cpanel/ea-php82/root/usr/bin/php

Set each domain’s version in MultiPHP Manager to match the audit. Under PHP-FPM, php_value and php_flag lines in .htaccess cause 500 errors; move them to the MultiPHP INI Editor.

Paths, .htaccess and nginx rules

  • DirectAdmin stores sites under /home/USER/domains/DOMAIN/public_html; on cPanel the main domain uses /home/USER/public_html. Search for hard-coded old paths:
    grep -rl "/domains/" /home/alice/public_html --include=*.php --include=.htaccess --include=.user.ini
  • DirectAdmin can keep a separate private_html folder for HTTPS. If it was a real folder rather than a link to public_html, merge any differences: cPanel serves HTTP and HTTPS from the same document root.
  • Rewrite rules that lived only in nginx custom configs must become .htaccess rules. Custom Apache directives go into include files under /etc/apache2/conf.d/userdata/, followed by /usr/local/cpanel/scripts/rebuildhttpdconf and /usr/local/cpanel/scripts/restartsrv_httpd.

Databases and grants

Check that each application connects: WordPress, for example, keeps DB_NAME, DB_USER and DB_HOST in wp-config.php. localhost works unchanged. Add any remote hosts from the audit in cPanel » Databases » Remote Database Access. If the source ran MySQL 8 and an import fails with “Unknown collation: ‘utf8mb4_0900_ai_ci'”, replace that collation in the dump with utf8mb4_unicode_ci and import again.

Cron jobs

Compare crontab -l -u alice on both servers. Replace DirectAdmin PHP paths with cPanel paths from the table above, and recreate missing jobs in cPanel » Advanced » Cron Jobs.

Email settings

  • Forwarders, autoresponders and the default (catch-all) address: compare counts per domain in cPanel » Email.
  • Spam filtering: re-enter thresholds and allow/deny lists in cPanel » Email » Spam Filters.
  • Roundcube address books: ask users to export contacts as vCard before the move and import them afterwards if they are missing.

Tell customers what changes

Most users notice the move through their logins, not their websites. Send a short notice before the cutover that covers:

  • The new control panel address: https://example.com:2083 for cPanel and https://example.com:2096 for webmail, instead of the DirectAdmin login on port 2222.
  • Mail client settings: unchanged if clients use mail.example.com; changed if they use the old server’s hostname.
  • FTP: same passwords, except accounts with an underscore in the name, which get new names.
  • The freeze window, during which they should not edit sites or move mail between folders.

Step 6: Test before DNS changes

Point your own workstation at the new server with the hosts file (/etc/hosts or C:\Windows\System32\drivers\etc\hosts):

203.0.113.20  example.com www.example.com mail.example.com
  • Load every site, log in to its admin area, submit a form and check the PHP error log.
  • Log in to a few mailboxes in webmail and send a test message.
  • Compare disk usage and mailbox counts with the audit sheet.
  • Check ownership: public_html should be alice:nobody with mode 750, files 644 and directories 755.

Test each account this way before you migrate DirectAdmin to cPanel for real at the DNS level. AutoSSL cannot validate until DNS points to the new server, so browsers show a certificate warning during this test. That is expected.

Step 7: Freeze and sync the delta

Changes made on DirectAdmin after the copy must be carried over. The simplest approach for small accounts is to transfer them again in the cutover window. For larger ones:

  1. Announce a short freeze. Put CMS sites in maintenance mode.
  2. Final database copy: dump on DirectAdmin and import on cPanel.
    mysqldump --single-transaction --routines --triggers alice_wp > alice_wp.sql
    mysql alice_wp < alice_wp.sql
  3. Web files: rsync -avz root@da.example.net:/home/alice/domains/example.com/public_html/ /home/alice/public_html/, then chown -R alice:alice /home/alice/public_html/*.
  4. Mail: use imapsync per mailbox; it skips messages already copied.
    imapsync --host1 da.example.net --user1 info@example.com --password1 'secret' --ssl1 --host2 cpanel.example.net --user2 info@example.com --password2 'secret' --ssl2 --maxage 7

If you do not know the mailbox passwords, stop Exim and Dovecot on DirectAdmin at cutover, copy new messages from /home/alice/imap/example.com/info/Maildir/ into /home/alice/mail/example.com/info/ with rsync (no --delete), fix ownership and run doveadm force-resync -u info@example.com '*'. Messages whose flags changed between copies can appear twice, so keep the gap short.

Step 8: Cut over DNS

  • DNS on DirectAdmin: change the domain’s nameservers at the registrar to the cPanel nameservers (and update glue records if you run your own ns1/ns2). Also edit the zones still on DirectAdmin so their A and MX records point to the new IP, which catches resolvers that cached the old NS records.
  • DNS elsewhere (registrar, Cloudflare): change the A, AAAA and MX records to the new IP.
  • Custom records: cPanel built new zones from its templates, so re-add verification TXT, SRV, CAA and external MX records.
  • SPF and DKIM: open WHM » Email » Email Deliverability and repair each domain. cPanel signs with the default._domainkey selector, while DirectAdmin uses x._domainkey, so both records can coexist during the change. Update SPF to include the new IP.

Once DNS resolves to the new server, run AutoSSL for each user: /usr/local/cpanel/bin/autossl_check --user=alice. Install purchased certificates in WHM » SSL/TLS » Install an SSL Certificate on a Domain if they did not come across.

Step 9: Post-migration checks

The job is not finished when DNS moves. For the first days after you migrate DirectAdmin to cPanel, check the following every morning:

  • Mail routing: exim -bt info@example.com should show local delivery; follow /var/log/exim_mainlog for inbound mail.
  • Outbound mail: send to an external mailbox and confirm SPF, DKIM and DMARC pass in the headers.
  • Web: check /var/log/apache2/error_log and each domain’s PHP error log for 24 hours.
  • Cron: confirm scheduled jobs ran (the cron log or the application’s own log).
  • Quotas and packages: assign the right package to each account and check the disk usage report.
  • Backups: enable WHM backups on the new server and test one restore before you decommission anything.
  • Security: enable cPHulk, two-factor authentication for WHM and your firewall, and ask users to enrol in 2FA again.

Rollback plan

Keep the DirectAdmin server and its licence for at least two weeks, with accounts intact. Before the cutover, write down the old DNS records and decide who can call a rollback and until when: a rollback two hours after the switch is simple, while one after two days of new orders, uploads and mail needs a reverse migration. If a critical problem appears:

  1. Point DNS back to the old records. With a 300-second TTL, most traffic returns within minutes.
  2. Copy mail that arrived on cPanel back to DirectAdmin with imapsync (swap host1 and host2).
  3. Export any database changes made on cPanel since the cutover and import them on DirectAdmin.
  4. Fix the cause, then repeat Steps 7 and 8.

Common errors

Error or symptomCauseFix
Account refused, invalid usernameToo long, starts with a digit or test, or reservedRestore with restorepkg --newuser
Domain already existsDomain on another account or left in a zoneRemove the stale zone or account, then retry
Transfer times out on a large accountHuge docroot or mail storepkgacct-da --skipdocroots plus rsync
500 Internal Server Errorphp_value in .htaccess under PHP-FPM, or missing extensionMove settings to MultiPHP INI Editor; add the EA4 extension
403 ForbiddenWrong ownership or mode on public_htmlalice:nobody, mode 750
Unknown collation on importMySQL 8 dump into MariaDBReplace utf8mb4_0900_ai_ci
Mailbox emptymbx format or zstd-compressed mailSync with imapsync
AutoSSL DCV failureDNS still points to DirectAdmin, CAA or a CDN proxyWait for DNS, fix CAA, rerun AutoSSL
Mail rejected by receiversOld SPF or missing DKIMRepair in Email Deliverability

Timeline and checklist

WhenTask
T-7 daysAudit, username check, notify customers, book the cutover window
T-3 daysInstall cPanel, EasyApache 4 PHP versions, packages, feature lists, nameservers
T-2 daysLower TTLs to 300 seconds; transfer and test a pilot account
T-1 dayTransfer all accounts; test through the hosts file; fix PHP and paths
T-0Freeze, final database, file and mail sync, DNS cutover, AutoSSL, SPF/DKIM
T+1 dayWatch mail and error logs; assign packages and resellers; enable backups
T+14 daysRaise TTLs, take a final DirectAdmin backup, cancel the old server

Plan to migrate DirectAdmin to cPanel one batch at a time, with one pilot account first. If cPanel is new to your team, the free cPanel migration service is worth a request; the checks and the DNS work in this playbook still apply.

Migrate DirectAdmin to cPanel at a glance

Migrate DirectAdmin to cPanel summary card: Lower DNS TTLs two days ahead, then in WHM open Transfers » Transfer Tool, enter the DirectAdmin server's IP and root…
In short: Lower DNS TTLs two days ahead, then in WHM open Transfers » Transfer Tool, enter the DirectAdmin server’s IP and root credentials, scan it, select the users and start the transfer.

Official documentation: cPanel migration services and guides (DirectAdmin exceptions), The restorepkg script, DirectAdmin: migrating accounts.

Related guides: Migrate cPanel accounts to a new server without customers noticing · Transferring accounts between servers with the WHM Transfer Tool · Migrate cPanel to DirectAdmin: Safe Account Transfer.

Frequently asked questions

Can the WHM Transfer Tool migrate accounts from DirectAdmin?

Yes. cPanel lists DirectAdmin as a supported source for the Transfer Tool, alongside cPanel & WHM, Plesk and Ensim. You need root SSH access to the DirectAdmin server.

Do email passwords survive a DirectAdmin to cPanel migration?

Yes. The migration copies email accounts with their password hashes, so users keep their passwords. Two-factor authentication and SpamAssassin settings do not transfer.

Are DNS zones copied exactly from DirectAdmin?

No. cPanel builds new zones from its own zone templates, so you must re-add custom records such as verification TXT, SRV, CAA and external MX records.

What happens to DirectAdmin packages and resellers?

They do not transfer. Accounts restore with unlimited package options and no reseller owner, so create the packages and resellers on cPanel and assign them after the restore.

How do I avoid losing email during the cutover?

Lower TTLs in advance, freeze or stop mail on DirectAdmin at cutover, sync the last messages with imapsync or rsync, then switch MX and keep the old server running for rollback.

Maintenance record

This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.

Maintained by
srvScripts editorial team
Last full review
Next review

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.