Tutorials

How to Migrate from cPanel to DirectAdmin: Complete Migration Walkthrough

How to Migrate from cPanel to DirectAdmin (Full Guide) - CpanelFree Guide
Written by Blog

Quick Answer: To migrate from cPanel to DirectAdmin: 1) Generate a full cPanel backup (/scripts/pkgacct username or cPanel Backup Wizard), 2) Transfer cpmove-username.tar.gz to DirectAdmin’s /home/admin/all_backups/ directory, 3) In DirectAdmin, go to Admin Backup/Transfer > Restore, select the cPanel backup format, and click Restore.

Why Web Hosts Are Switching to DirectAdmin

DirectAdmin is a mature, high-performance web hosting control panel known for its lightweight memory footprint and stable pricing. DirectAdmin includes a native cPanel-to-DirectAdmin conversion tool that automatically parses cPanel pkgacct archives, extracting web files, MySQL databases, email mailboxes, and DNS zone files with 100% data fidelity.

Step 1: Generate Full cPanel Backup Archive

On your cPanel server (via SSH root or cPanel Backup Wizard):

# Generate full cPanel package archive
/scripts/pkgacct username /home/

# Generates: /home/cpmove-username.tar.gz

Step 2: Transfer Archive to DirectAdmin Server

scp /home/cpmove-username.tar.gz root@directadmin-ip:/home/admin/all_backups/

Step 3: Execute Restore in DirectAdmin

  1. Log in to DirectAdmin at https://your-server-ip:2222 as admin.
  2. Navigate to Admin Tools > Admin Backup/Transfer.
  3. Click on the Restore tab.
  4. Select the backup path /home/admin/all_backups.
  5. DirectAdmin will automatically detect the cPanel cpmove archive format. Click Restore.

Understanding DirectAdmin Administrator Backup vs User Level Backup

DirectAdmin provides two distinct backup restoration tiers:

  • Admin Level Backup / Restore: Converts full cPanel account packages (cpmove-user.tar.gz) into DirectAdmin format, creating system user accounts, virtual hosts, SSL certs, and database grants automatically.
  • User Level Backup: Restores specific website document roots (public_html) and individual MySQL databases within an existing DirectAdmin user account.

Automated Bulk Server-to-Server Migration via DirectAdmin CLI

For hosting providers migrating hundreds of cPanel accounts simultaneously, DirectAdmin offers an automated batch conversion script:

cd /usr/local/directadmin/scripts
./cpanel_to_da.sh /home/admin/all_backups/cpmove-user.tar.gz

Complete cPanel to DirectAdmin Migration Checklist

  1. Step 1 (Generate cPanel Backup): Log in to WHM/cPanel and generate a full cpmove package via /scripts/pkgacct username /home/.
  2. Step 2 (Transfer Archive): Copy cpmove-username.tar.gz to DirectAdmin’s /home/admin/all_backups/ folder.
  3. Step 3 (Enable Migration Mode): In DirectAdmin, ensure the cPanel-to-DirectAdmin migration tool is activated under Admin Backup/Transfer.
  4. Step 4 (Execute Restore): Select the cpmove archive and click Restore. DirectAdmin will provision the user account, Apache/Nginx vhosts, databases, mailboxes, and DNS zone files.
  5. Step 5 (Verify & Cutover DNS): Test the restored site via local hosts file and update nameservers at your registrar.

Managing Custom Apache / Nginx Templates in DirectAdmin CustomBuild

DirectAdmin features CustomBuild 2.0, allowing administrators to switch between Apache, Nginx, Nginx Reverse Proxy + Apache, or OpenLiteSpeed in 1-click:

cd /usr/local/directadmin/custombuild
./build set webserver openlitespeed
./build set php1_mode lsphp
./build openlitespeed

Zero-Hassle Web Hosting on CpanelFree

Skip expensive control panel licenses. Enjoy genuine cPanel shared hosting with NVMe SSD speeds and AutoSSL at $0 cost on CpanelFree.

Claim Free Hosting Account

Frequently Asked Questions

Are email accounts and passwords preserved during migration?

Yes. DirectAdmin’s migration parser translates cPanel shadow files and Dovecot mail directories, ensuring email users can log in with their existing passwords without interruption.

Comparing DirectAdmin CustomBuild vs cPanel EasyApache 4

While cPanel utilizes EasyApache 4 (RPM-based package management), DirectAdmin relies on CustomBuild 2.0 (source-compiled or binary packages). CustomBuild allows administrators to compile custom PHP modules, tune Nginx caching buffers, and update MariaDB versions with single-line terminal commands.

Can I restore individual cPanel databases without restoring the full account?

Yes. You can extract the .sql files from inside cpmove-user.tar.gz (located in the mysql/ folder) and import them directly into DirectAdmin’s MySQL Management dashboard.

Configuring Automated Lets Encrypt SSL Auto-Renewal in DirectAdmin

DirectAdmin includes built-in automated ACME certificate management. Under SSL Certificates, select Free & automatic certificate from Let’s Encrypt, check your domain and wildcard subdomains, and click Save. DirectAdmin will configure automated renewal cron jobs running every 60 days.

Pro Sysadmin Tip: Switching PHP Versions in DirectAdmin

DirectAdmin supports multiple concurrent PHP versions (e.g. PHP 8.1, 8.2, 8.3). In the user control panel under Domain Setup, administrators can toggle PHP versions on a per-domain basis in real time.

DirectAdmin’s native cPanel conversion tools provide an effortless, reliable pathway for webmasters and hosting providers seeking lightweight, enterprise-grade control.

DirectAdmin also includes integrated multi-server clustering features, enabling automated DNS synchronization across geographically distributed nameservers without manual zone file replication.

By following these structured export, restore, and verification steps, system administrators can migrate complex web hosting accounts to DirectAdmin seamlessly with zero data loss.

Additionally, DirectAdmin provides granular resource throttling through Linux cgroups, allowing administrators to allocate dedicated CPU quotas and I/O bandwidth per hosting account with complete multi-tenant stability.

With its robust backup converter and low resource usage, DirectAdmin remains a top choice for modern hosting operations.

Following this migration process guarantees complete data fidelity and seamless continuity for your websites.

About the author

Blog

DevOps architect and Linux sysadmin specializing in server hardening, OpenLiteSpeed performance optimization, and free cloud hosting infrastructure.

Leave a Comment