DirectAdmin

Migrate from DirectAdmin to cPanel

Move accounts from DirectAdmin to MdmHost cPanel: create a DirectAdmin user backup, extract files and databases, migrate mailboxes and switch DNS with no downtime.

IntermediateDirectAdmin to cPanel4 min read

A DirectAdmin to cPanel migration moves a hosting account from a DirectAdmin server to cPanel. The two panels store accounts differently, so you take a DirectAdmin backup, extract what you need and rebuild the account on cPanel.

Before you start

  • A DirectAdmin user login (or admin/reseller login for several users).
  • Your MdmHost cPanel account details.
  • An inventory: domains, subdomains, databases, email accounts, forwarders, cron jobs and custom DNS records.

Create a DirectAdmin backup

  1. Log in to DirectAdmin and open Create/Restore Backups (under Advanced Features or System Info & Files, depending on the skin).
  2. Select everything (domains, databases, email, FTP, cron jobs) and create the backup.
  3. When it finishes, download the user.reseller.username.tar.gz (or .tar.zst) file from the backups folder in File Manager.

More detail is in DirectAdmin backup and restore.

What is inside the archive

Path in archiveContents
domains/example.com/public_htmlWebsite files
backup/*.sqlDatabase dumps
backup/example.com/email/Mail account lists and settings
imap/example.com/Mail data
backup/crontab.confCron jobs

DirectAdmin to cPanel migration: restore files and databases

  1. Extract the archive on your computer (7-Zip handles .tar.gz; use zstd -d for .zst).
  2. Add any extra domains in cPanel → Domains → Domains.
  3. Zip the contents of domains/example.com/public_html, upload it in File Manager to the matching document root and extract.
  4. Create each database and user in Databases → Manage My Databases, then import the matching .sql file with phpMyAdmin.
  5. Update database credentials in the application config.

Note: Moving many DirectAdmin accounts at once? Open a ticket at MdmHost support before you start so the move can be planned per account.

Migrate email with IMAP sync

Mailboxes rarely restore cleanly between different control panels, so the dependable method is to create the same addresses in cPanel → Email → Email Accounts and copy the messages over IMAP:

  1. List every mailbox on DirectAdmin with its approximate size.
  2. Create the same addresses on cPanel and give each enough quota.
  3. Run an IMAP sync per mailbox from the old server (by IP or hostname, since DNS still points there) to the new one. imapsync between servers explains the command; migrate email to cPanel over IMAP covers the cPanel side.
  4. After the DNS switch, run the same sync again. imapsync skips messages it has already copied, so the second pass only picks up mail that arrived in between.

Tip: Forwarders, autoresponders and filters are not copied by IMAP. Note them down on the old panel and recreate them under cPanel → Email.

Copy DNS records

In DirectAdmin open DNS Management and copy custom TXT, CNAME and SRV records into cPanel → Zone Editor. Skip the old A and MX entries.

Switch DNS with minimal downtime

  1. One or two days before the move, lower the TTL of the A, AAAA and MX records at the current DNS host to 300 seconds. See DNS TTL strategy for a server migration.
  2. Test the new copy before switching: add the new server IP for the domain to your computer's hosts file and browse the site.
  3. Freeze changes on the old site (no new orders, posts or comments), take a final database export and import it on cPanel if content has changed since the first copy.
  4. Either point the A records to the new IP, or change the domain's nameservers to the ones in your MdmHost welcome email. Changing records is faster when the TTL is already low; nameserver changes can take up to 24–48 hours.
  5. Keep the old account running for at least a week so slow resolvers and delayed mail still land somewhere.

Post-migration checks

  • The site loads over HTTPS with a valid certificate. AutoSSL issues it once DNS points to MdmHost; run it from cPanel → Security → SSL/TLS Status if needed.
  • Forms, logins, checkouts and uploads work, and there are no database connection errors.
  • Sending and receiving email works from webmail and from your mail client, and SPF/DKIM pass in cPanel → Email → Email Deliverability.
  • Cron jobs are recreated under cPanel → Advanced → Cron Jobs with the new paths (/home/username/…).
  • The PHP version in cPanel → Software → MultiPHP Manager matches what the old server used.
  • Cron jobs from crontab.conf are re-added with cPanel paths.

FAQ

Can I upload a DirectAdmin backup to cPanel's restore page?

No. cPanel's restore expects cPanel archives. Extract and import the parts instead.

Can I copy mail folders instead of using IMAP sync?

It is possible over SSH, but folder naming and permissions differ between panels. IMAP sync is safer and keeps read flags.

Do I need DirectAdmin admin access?

No. A user-level backup contains everything for that account.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.