# Migrate cPanel to DirectAdmin: Safe Account Transfer

Source: https://srvscripts.com/guides/migrate-cpanel-to-directadmin/
Updated: 2026-10-07
Publisher: srvScripts (https://srvscripts.com/)

With cPanel’s 2026 pricing and a run of root-escalation advisories since April, more providers are moving some or all of their shared hosting to DirectAdmin. The mechanics are well understood: cPanel produces a full account archive, DirectAdmin converts and restores it. What takes the time is everything after the restore, because the two panels differ in mail storage, PHP handling, DNS templating and certificate management. This guide covers both halves.

In short: Create a cpmove archive for each account with /scripts/pkgacct, copy it to /home/admin/admin_backups/ on a DirectAdmin 1.711 or later server, and restore it from Admin Backup/Transfer → Restore, where cPanel archives are accepted directly.

**Short answer:** Create a cpmove archive for each account with `/scripts/pkgacct`, copy it to `/home/admin/admin_backups/` on a DirectAdmin 1.711 or later server, and restore it from **Admin Backup/Transfer → Restore**, where cPanel archives are accepted directly. Then rewrite DNS zones for the new IPs, strip `x-httpd-ea-php` handler lines from `.htaccess`, recreate Exim customisations, enable automatic TLS and test mail on the new IP before changing nameservers.

## Prepare the DirectAdmin side

Build the destination first, ideally with the same web server family and PHP versions the accounts use. If the cPanel server runs EasyApache with PHP 8.2 and 8.4, set the same versions in CustomBuild before importing, or every site lands on the default version. Our [DirectAdmin installation guide](/guides/install-directadmin-almalinux-debian-13/) covers the base install, and [PHP versions with CustomBuild](/guides/custombuild-php-versions-extensions/) the version selection.

Confirm the destination is on a current release, 1.711 or later, because the import support and the new ACME TLS system both matured through the 1.70x series:

```
da version
da update
```

Decide how ownership maps. cPanel accounts belong to a reseller or to root; DirectAdmin restores them under the admin or a reseller you choose at restore time.

## Generate the archives on cPanel

On the cPanel server create a full backup for each account, skipping the home-directory tarball only if you plan to rsync it separately:

```
/scripts/pkgacct username /backup/cpmove
```

For a fleet, loop over `/var/cpanel/users/`. Transfer the resulting `cpmove-username.tar.gz` files to the DirectAdmin server’s admin backup directory:

```
rsync -av --progress /backup/cpmove/ root@da.example.net:/home/admin/admin_backups/
chown admin:admin /home/admin/admin_backups/cpmove-*.tar.gz
```

Keep the archives on the source until the migration is signed off. They are the rollback.

## Convert and restore

Current DirectAdmin builds recognise cPanel archives in the restore workflow. Open **Admin Level → Admin Backup/Transfer → Restore**, select the local path `/home/admin/admin_backups`, and the cpmove files appear alongside native backups. Choose the owner, the IP to assign and whether to restore DNS zones, then start the restore. Progress and errors are written to `/var/log/directadmin/system.log` and `/var/log/directadmin/errortaskq.log`, and the admin receives a summary message per account.

If your build does not list cpmove archives, or the import fails on an unusual account layout, use the standalone converter published by DirectAdmin, which turns a cpmove file into a native DirectAdmin user backup that the same restore page accepts. Check the changelog for your version to see which path applies.

The restore recreates the user, domains, subdomains, databases, email accounts, forwarders, cron jobs and the home directory. It maps the cPanel package to a DirectAdmin package with equivalent limits if one exists, or creates the user with custom limits otherwise.

## The post-migration checklist

Mail is the area with the most differences. cPanel stores mail in `~/mail/domain/user/`; DirectAdmin uses `/home/user/imap/domain/user/Maildir/`. The import moves the messages, but Dovecot indexes are rebuilt on first login, so large mailboxes are slow for the first few minutes. Mail passwords are carried across in hashed form and work unchanged. What is not carried across is any Exim customisation made in WHM’s Exim Configuration Manager; outbound relays, rate limits and blocklists have to be recreated in DirectAdmin’s `exim.conf` include files. If the source used a smarthost, [MailBaby on DirectAdmin](/guides/directadmin-exim-mailbaby-relay/) shows the DirectAdmin form of that configuration.

DNS zones are imported with the source server’s IPs and nameservers. Rewrite them for the new server before changing delegation:

```
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
```

Then review one zone in **Admin Level → DNS Administration** to confirm the A, MX and SPF records reference the destination. DKIM keys are regenerated on the destination, so the customer’s `default._domainkey` record changes; if the customer hosts DNS elsewhere they must update it. [Rspamd versus SpamAssassin and DKIM on DirectAdmin](/guides/directadmin-rspamd-vs-spamassassin/) explains where the new keys live.

PHP `.htaccess` handler lines written by cPanel’s MultiPHP, such as `AddHandler application/x-httpd-ea-php82`, break on DirectAdmin’s Apache with a 500 error. Search and remove them:

```
grep -rl 'x-httpd-ea-php' /home/*/domains/*/public_html/.htaccess
```

Certificates issued by AutoSSL are imported as manual certificates. Enable automatic TLS on each domain from the user’s SSL page so the new system takes over renewals; otherwise they expire quietly at the end of their term.

## Common pitfall: cutting DNS over before the mail test

The most common failure is switching nameservers while the destination Exim is still configured with the source hostname or before the `hostname` certificate is issued. Mail then arrives at a server that rejects it with a TLS or HELO problem. Send a test message to a migrated mailbox using the destination IP directly, and check `/var/log/exim/mainlog` for a clean delivery, before touching delegation.

## Verify

For each migrated account, run through a fixed set of checks: the site loads over HTTPS using a hosts-file override to the new IP, a login to webmail succeeds, `mysql -e 'SHOW DATABASES'` as the user lists the expected databases, and cron jobs appear on the user’s cron page. Keep the source server running read-only for a week and compare disk usage with `du -sh /home/user` on both sides to catch anything the archive missed. Our [backup verification script](/scripts/backup-verify/) can be pointed at the new server’s backup directory once the first scheduled DirectAdmin backup runs.

## Migrate cPanel to DirectAdmin at a glance

**Official documentation:** [DirectAdmin documentation](https://docs.directadmin.com/), [cPanel & WHM documentation](https://docs.cpanel.net/), [Linux man pages](https://man7.org/linux/man-pages/).

**Related guides:** [Migrate DirectAdmin to cPanel with the WHM Transfer Tool or pkgacct-da](https://srvscripts.com/guides/migrate-directadmin-to-cpanel/) · [Choosing a VPS for a cPanel or DirectAdmin server in 2026](https://srvscripts.com/guides/best-vps-for-cpanel-directadmin-server/) · [KernelCare on cPanel and DirectAdmin servers: setup, verification and rollback](https://srvscripts.com/guides/kernelcare-setup-cpanel-directadmin/).

**See also:** [cPanel vs DirectAdmin (2026): Price, Features and Migration](/guides/cpanel-vs-directadmin/) · [Hosting Control Panel Pricing 2026: cPanel vs DirectAdmin vs Plesk](/guides/control-panel-pricing-2026/)

## Frequently asked questions

### Does migrating from cPanel to DirectAdmin keep email passwords and mailboxes?

Yes. Mailboxes are moved into DirectAdmin’s Maildir layout and passwords are carried across in hashed form, so customers log in unchanged. Dovecot rebuilds its indexes on first login, which makes large mailboxes slow for a few minutes.

### How long does a cPanel to DirectAdmin migration take per account?

Archive generation and restore for a typical account of a few gigabytes finishes in minutes; the transfer time is set by the link between servers. Budget most of the project for the post-restore checks and a week of running the source read-only.

### Can I migrate cPanel to DirectAdmin without downtime?

Close to it. Restore the accounts while the source is live, test with a hosts-file override, then lower DNS TTLs, resync the home directories and databases, and switch delegation. The only true gap is the final resync window for busy sites.
