# Migrate DirectAdmin to cPanel: Complete 9-Step Migration Playbook

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

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.

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.

## Which method to use

| Method | Best for | Needs | Pros | Cons |
| --- | --- | --- | --- | --- |
| WHM Transfer Tool | Most migrations, many accounts | Root SSH to DirectAdmin | Packages, copies and restores in one queue; logs per account | Large accounts can time out; limited control per step |
| pkgacct-da + restorepkg | Single large accounts, retries, custom scheduling | Root SSH, disk space on both sides | Full control; can skip docroots and rsync them separately | More manual work |
| cPanel migration service | Teams short on time | Licensed, freshly installed cPanel server | Free for DirectAdmin sources; done by cPanel staff | Scheduling; you still own DNS and testing |
| Manual (files, dumps, imapsync) | No root on the source | Account-level access only | Works with any host | Slow; 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:

| Item | Why it matters on cPanel |
| --- | --- |
| Usernames | cPanel 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 lists | Not transferred; recreate them |
| PHP version and mode per domain | Install the same versions in EasyApache 4 first |
| Mailbox count and size | Plan the delta sync and the freeze window |
| Mailing lists, FTP users with _ | Not converted; recreate |
| Where DNS is hosted | On DirectAdmin itself, at the registrar or at Cloudflare; decides the cutover |
| Custom httpd or nginx configs | Not transferred; rewrite as cPanel includes or .htaccess |
| Remote MySQL hosts | Add them in cPanel’s Remote Database Access |

## Step 2: Prepare the cPanel server

- 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`).

- Set the default PHP version and handler in **WHM » Software » MultiPHP Manager**.

- Create hosting packages and feature lists with the same names as on DirectAdmin, so you can assign them after the restore.

- Configure nameservers in **WHM » Server Configuration » Basic WebHost Manager Setup** and choose the AutoSSL provider in **WHM » SSL/TLS » Manage AutoSSL**.

- 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.

- 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:

| Item | Result on cPanel | Action |
| --- | --- | --- |
| Web files, domains, subdomains | Transferred; extra domains become addon domains | Check document roots in cPanel » Domains |
| Databases and database users | Transferred | Re-add remote hosts; check app configs |
| Email accounts and passwords | Transferred with the password hashes | Test logins |
| mbx mailboxes, zstd-compressed mail | Not converted or not transferred | Use imapsync for those mailboxes |
| DNS zones | Rebuilt from cPanel zone templates, not copied | Re-add custom TXT, SRV, CAA, CNAME and external MX records |
| SpamAssassin settings and allow/deny lists | Not transferred | Recreate in cPanel » Spam Filters |
| Packages | Not transferred; accounts set to unlimited | Assign packages in WHM » Upgrade/Downgrade an Account |
| Feature lists | Not transferred; default list used unless the same name exists | Create matching lists first |
| Resellers | Not identified | Recreate and change account ownership |
| Mailing lists (Majordomo) | Not converted | Rebuild on your list platform |
| FTP accounts with _ in the name | Not transferred | Recreate with a new name |
| Forwarding-only and “No Hosting” domains | Not migrated | Convert to hosted domains first, or recreate as redirects |
| Two-factor authentication | Not transferred | Users enrol again |
| Custom panel and server configuration | Not transferred | Replicate 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

- In WHM go to **Transfers » Transfer Tool**.

- 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.

- Click **Scan Remote Server**. WHM connects over SSH, identifies the DirectAdmin server and lists its users.

- Select a pilot account first, then start the copy. WHM packages the user on DirectAdmin, copies the archive and restores it.

- Watch the session; afterwards open **WHM » Transfers » Review Transfers and Restores** for per-account logs and warnings.

- 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

| DirectAdmin | cPanel equivalent |
| --- | --- |
| CustomBuild php1_release … php4_release | EasyApache 4 packages ea-phpXY |
| Per-domain PHP version selector | cPanel » MultiPHP Manager (per domain) |
| php-fpm mode | PHP-FPM enabled in MultiPHP Manager |
| lsphp with LiteSpeed | LiteSpeed Enterprise for cPanel |
| Custom PHP settings per domain | MultiPHP 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:

- Announce a short freeze. Put CMS sites in maintenance mode.

- Final database copy: dump on DirectAdmin and import on cPanel.

```
mysqldump --single-transaction --routines --triggers alice_wp > alice_wp.sqlmysql alice_wp < alice_wp.sql
```

- 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/*`.

- 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:

- Point DNS back to the old records. With a 300-second TTL, most traffic returns within minutes.

- Copy mail that arrived on cPanel back to DirectAdmin with imapsync (swap host1 and host2).

- Export any database changes made on cPanel since the cutover and import them on DirectAdmin.

- Fix the cause, then repeat Steps 7 and 8.

## Common errors

| Error or symptom | Cause | Fix |
| --- | --- | --- |
| Account refused, invalid username | Too long, starts with a digit or test, or reserved | Restore with restorepkg --newuser |
| Domain already exists | Domain on another account or left in a zone | Remove the stale zone or account, then retry |
| Transfer times out on a large account | Huge docroot or mail store | pkgacct-da --skipdocroots plus rsync |
| 500 Internal Server Error | php_value in .htaccess under PHP-FPM, or missing extension | Move settings to MultiPHP INI Editor; add the EA4 extension |
| 403 Forbidden | Wrong ownership or mode on public_html | alice:nobody, mode 750 |
| Unknown collation on import | MySQL 8 dump into MariaDB | Replace utf8mb4_0900_ai_ci |
| Mailbox empty | mbx format or zstd-compressed mail | Sync with imapsync |
| AutoSSL DCV failure | DNS still points to DirectAdmin, CAA or a CDN proxy | Wait for DNS, fix CAA, rerun AutoSSL |
| Mail rejected by receivers | Old SPF or missing DKIM | Repair in Email Deliverability |

## Timeline and checklist

| When | Task |
| --- | --- |
| T-7 days | Audit, username check, notify customers, book the cutover window |
| T-3 days | Install cPanel, EasyApache 4 PHP versions, packages, feature lists, nameservers |
| T-2 days | Lower TTLs to 300 seconds; transfer and test a pilot account |
| T-1 day | Transfer all accounts; test through the hosts file; fix PHP and paths |
| T-0 | Freeze, final database, file and mail sync, DNS cutover, AutoSSL, SPF/DKIM |
| T+1 day | Watch mail and error logs; assign packages and resellers; enable backups |
| T+14 days | Raise 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

**Official documentation:** [cPanel migration services and guides (DirectAdmin exceptions)](https://docs.cpanel.net/knowledge-base/technical-support-services/cpanel-migration-services-and-guides/), [The restorepkg script](https://docs.cpanel.net/whm/scripts/the-restorepkg-script/), [DirectAdmin: migrating accounts](https://docs.directadmin.com/directadmin/backup-restore-migration/migrations.html).

**Related guides:** [Migrate cPanel accounts to a new server without customers noticing](/guides/migrate-cpanel-accounts-new-server/) · [Transferring accounts between servers with the WHM Transfer Tool](/guides/whm-transfer-tool/) · [Migrate cPanel to DirectAdmin: Safe Account Transfer](/guides/migrate-cpanel-to-directadmin/).

## 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.
