Knowledge Base

How to migrate account, files, databases or emails from cPanel to DirectAdmin?

Important 1: We offer free migration of Your websites to Our web hosting.

You must migrate 4 most important elements: files, databases, SSL and emails. You also have to change name servers of Your domain.

Important 2: Make sure that You will set the same PHP version in DirectAdmin, as it was in cPanel, how to do it check HERE.

Migrate files.

This point is most easy, we have to move all files of Your website. Default location of website files in cPanel is /, /public_html or /public_html/ and default location in DirectAdmin is /domains/ All we have to do is to move them from first location to second one, we can do it in 2 ways.

First one is to simply use FTP client and download all files from cPanel to Your local PC, and then upload them to DirectAdmin, but it will take long time if there are many files, and it is very important to use binary mode in Your FTP client.

Second one is faster and most recommended. We will use files manager in cPanel and DirectAdmin. First You have to create zip file of all Your files in cPanel, this can be done by clicking “Backup” in main window of cPanel and then “Home Directory” under Download a Home Directory Backup, or by going to “File Manager”, right clicking on Your website directory (for example /public_html/ and selecting “Compress”, which will create zip file of Your files. Now You have to upload that file to /domains/ by ftp or file manager in DirectAdmin hosting.

After it is done go to file manager in DirectAdmin, find location of Your zip file and click extract, which should be next to other actions like copy or rename. In next window just confirm extraction, after that, all Your files should be visible in /domains/ directory. Make sure that there will be only website files, if not delete rest of unneeded files and directories.

Migrate database.

Not all websites or CMS use databases, but most of them do, like Wordpress, Drupal or Joomla. To migrate database, You have to download it first from cPanel and You can do it in 2 ways.

First one is to go to “Backup” in main window of cPanel and then under “Download a MySQL Database Backup” click database that You want to download. Second way is by going to phpMyAdmin, click “Export”, click “Custom”, selecting database that You want to move, also find “Compression” option and select “zipped” and click “Go”. After that You should download Your database. If You don't know which database Your website is using, You can check it in it's config file, for example in Wordpress it will be wp-config.php.

Now login to DirectAdmin, go to “MySQL Management”, “Create new Database”, fill in all fields to create Your new database, lets say for example Database Name and Database Username is user_mydb1 and password is pass235. Now go back to “MySQL Management”, under “Upload a Database Backup” and next to “Select Database” select database that You just created, in our example it will be user_mydb1. Now in select file, find zip file that You have downloaded from cPanel and click “Upload”. If it fails You can also try to import database in phpMyAdmin, just login to phpMyAdmin (how to do it You can check HERE) go to, “Import” and select database file that You downloaded from cPanel.

After Your database was imported, You have to tell Your website, that You have changed database name, user and password. You must find config file of Your cms or website, for example in wordpress it will be wp-config.php, in Joomla configuration.php and in Drupal it is sites/default/settings.php file, other cmses have their own config file. You must edit it and change old values to new one, in our example database name and user name is user_mydb1 and password is pass235.

Migrate emails.

Moving emails is very similar to moving files of Your website, there is just few differences. First create exactly same email in DirectAdmin as it was in cPanel, how to do it You can check HERE. In this tutorial we will move email as an example.

Now go to and login to Your newly created email, this will create directory structure of Your email on DirectAdmin host.

In our example of, for cPanel, all emails files are stored in /mail/ directory, and for DirectAdmin it will be /imap/, all we have to do is move those files and directories from one location to second one. You can use ftp for this (just remember to use binary mode) or by file manager in same way as we already discussed at first chapter “Migrate files” of this tutorial.

After You move all Your files it is very important to delete all files starting with dovecot on DirectAdmin hosting, this will force dovecot to rebuild it's index and after that we will see all our emails on new account.

Name Servers and SSL.

After Your files, databases and emails are moved You have to change name servers of Your domain to and

After domain propagation is done (in most situations after few hours), You will have to install SSL, because without it https will not work, how to do it You can check HERE.

That's all, Your website and emails should be working now on new DirectAdmin hosting. Of course there might be any problems during migration, but we are here to help, just make a ticket. Also remember that we can also move Your website to our web hosting for free.

Webhosting1st is offering reliable and cheap web hosting, prices are starting at just $10/year, for more details please check our plans.

Please rate this article to help us improve our Knowledge Base.

1 0