The Wild

cPanel to DirectAdmin Migration: User's Guide

· 6 min read · Mammals

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Migrating from cPanel to DirectAdmin as an end user means moving your website files, databases, and email accounts from one hosting control panel to another. This guide walks you through the process step by step, assuming you have access to both panels and a way to download/upload files. You'll need your cPanel login, your DirectAdmin login, and FTP/SFTP credentials or a file manager in both panels.

What You'll Need

  • cPanel login credentials (username, password)
  • DirectAdmin login credentials (provided by your new host)
  • FTP/SFTP client (like FileZilla) or access to file managers in both panels
  • A temporary location to store backups (your computer or cloud storage)
  • Your domain's DNS management access (usually at your registrar or current host)
  • Database credentials (if you have databases)
  • Email account passwords (you'll recreate them on DirectAdmin)

Step-by-Step

  1. Back up your website files from cPanel. In cPanel, go to the "Backup" or "Backup Wizard" section. Choose "Full Backup" or "Home Directory" backup. Download the resulting .tar.gz file to your computer. If you prefer, use FTP to download the entire public_html folder and any other folders you need.
  2. Export your databases from cPanel. Go to "phpMyAdmin" in cPanel. Select each database you use, click "Export," choose the "Quick" method, and download the .sql file. Repeat for each database. Note the database names and usernames.
  3. Back up your email from cPanel. If you use webmail, you can create an email filter or forwarder, but the simplest is to download your emails via IMAP using an email client (like Outlook or Thunderbird) to your computer. Alternatively, if your host offers a backup of the mail directory, download that too.
  4. Set up your domain on DirectAdmin. Log in to DirectAdmin. Go to "Domain Setup" or "Add Domain" and add your domain name. This creates the necessary folders (public_html, etc.).
  5. Upload your website files to DirectAdmin. Use the File Manager in DirectAdmin (under "File Manager" in the panel) or an FTP client. Upload the contents of your cPanel public_html folder into the public_html folder on DirectAdmin. If you downloaded a full backup, you may need to extract it and upload the files manually.
  6. Create your databases in DirectAdmin. Go to "MySQL Management" in DirectAdmin. Create a new database and a user with a password. Note the database name and username (they'll have a prefix). Then, in phpMyAdmin (available in DirectAdmin), import the .sql files you exported earlier. You may need to update your website's configuration file (like wp-config.php for WordPress) with the new database name, user, and password.
  7. Recreate your email accounts. In DirectAdmin, go to "Email Accounts." Create each email account you had in cPanel, with the same address and a new password. If you have email forwarders or filters, recreate them under "Forwarders" and "Filters" sections.
  8. Update your website's configuration files. If your site uses absolute paths or URLs, you may need to adjust them. Check files like wp-config.php (WordPress), configuration.php (Joomla), or .env files for database credentials and site URLs. Update them to reflect the new database name and user.
  9. Test your website. Before switching DNS, you can test by editing your computer's hosts file to point your domain to the new server's IP address. Or, if your host provides a temporary URL, use that. Check that pages load, forms work, and databases are connected.
  10. Switch your DNS. Go to your domain registrar or DNS provider and update the nameservers to the ones provided by your DirectAdmin host. DNS propagation can take up to 48 hours, but often happens within a few hours.
  11. After DNS propagates, verify everything. Once your domain points to the new server, test your website, email sending/receiving, and any other services. Keep your cPanel backup for a few weeks in case you need to roll back.

Common Mistakes

  • Forgetting to update database credentials. Many end users upload files but forget to change the database name and user in the site's config file. This results in a "database connection error."
  • Not backing up email before switching. If you skip email backup, you may lose old emails when the cPanel server is deactivated.
  • Uploading files to the wrong folder. Ensure you upload to public_html, not the root or a subfolder, unless your site uses a subfolder.
  • Changing DNS before testing. If you switch DNS and the site isn't ready, visitors will see errors. Always test locally first.
  • Ignoring file permissions. Some scripts need specific file permissions (e.g., 755 for folders, 644 for files). DirectAdmin may set different defaults; check if your site has issues.

Tips

  • Use a full cPanel backup if available, as it includes files, databases, and email in one package. However, you'll still need to manually recreate email accounts and update database credentials.
  • If you have many databases, export them all and import them one by one, keeping track of names.
  • For email, consider using an email client to sync all folders to your computer before the move. After the move, you can re-upload them to the new server via IMAP.
  • If your site uses SSL certificates, you'll need to reissue them on DirectAdmin. Many hosts provide free AutoSSL, or you can use Let's Encrypt.
  • Take a screenshot of your cPanel settings (cron jobs, addon domains, etc.) to recreate them in DirectAdmin.

Troubleshooting

  • Website shows a database connection error: Double-check the database name, username, and password in your site's config file. Ensure the database exists and the user has all privileges.
  • Files upload but site shows 404: Check that you uploaded files to the correct public_html folder. Also, ensure .htaccess files were uploaded (they may be hidden; enable "Show Hidden Files" in your FTP client).
  • Emails not sending/receiving: Verify DNS for mail (MX records) points to the new server. Also, check that email accounts exist and passwords are correct. If you used a backup, ensure the mail directory is in the right place.
  • Site loads but images are broken: This often indicates file permissions or missing files. Check that all files were uploaded completely and permissions are set correctly (folders 755, files 644).
  • Can't access DirectAdmin file manager: Try FTP instead. If FTP fails, contact your host for support.

Frequently Asked Questions

Do I need to change my domain's nameservers?

Yes, if you're moving to a new hosting provider, you'll need to update your nameservers to the ones provided by your DirectAdmin host. This is done at your domain registrar.

Will my website's URLs change?

No, as long as you keep the same domain name and use the same folder structure (public_html), your URLs should remain the same.

Can I migrate without a backup?

Technically yes, but it's risky. You could manually download files via FTP and export databases via phpMyAdmin, but a backup is safer and more comprehensive.

How long does the migration take?

It depends on the size of your website and your internet speed. File transfer can take minutes to hours. DNS propagation can take up to 48 hours, but often completes in a few hours.

What about my SSL certificate?

You'll need to reissue it on DirectAdmin. Most hosts offer free AutoSSL or Let's Encrypt, which you can activate in the panel.

What if I have addon domains or subdomains?

You'll need to recreate them in DirectAdmin under "Domain Setup" and upload their files to the corresponding folders. Make sure to back them up from cPanel as well.