In this post I’ll explain how to migrate a website from a cPanel account to one using DirectAdmin control panel. I have already explained all the principles of (WordPress) website migration so in this post I’ll only be explaining the peculiarities related to DirectAdmin – understanding that all the terms used in the linked migration post are known to the reader.
A separate post explains the creation of user accounts and automated backups using DirectAdmin.
Contents:
- Creating a database using DirectAdmin
- Path editing
- Importing database and the files
- Creating email accounts
- DNS / nameserver change
- “Installing” SSL / TLS certificates
- My first DirectAdmin personal impression
1. Creating a database using DirectAdmin
For WordPress and other websites using a database, it has to be created first, before importing it:

Picture 1
Next screen shows option for choosing the database name, username and a password for accessing the database:

Picture 2
2. Path editing
At least on the DirectAdmin test account, path is created somewhat differently than I’m used to with previous cPanel hosts. So at least that will have to be edited in all the files. The principle is already explained here.
cPanel path is usually:
/home/account_name/public_html/
while DirectAdmin uses:
/home/account_name/domains/domain-name.com/public_html/
I don’t like this setup for a much longer path. Though it depends on domain name length of course. I know a few WordPress sites with long, “descriptive” image file names that will get hurt by this.
The rest I created to match the previous location (database name, username etc.). And the domain is the same, of course. So nothing else needs editing.
3. Importing database and the files
Files are uploaded using FTP, then un-zipped using the DirectAdmin file manager control panel.

Picture 3
Then I’m unpacking files:

Picture 4
Now is the time to import the database. I chose the option phpMyAdmin which, after asking for the account username and password, took me to the well known phpMyAdmin menu.

Picture 5
After this, I did phpMyAdmin database import.
4. Creating email accounts

Picture 6
Export and import of emails won’t be done, since I don’t like keeping them on the hosting server. Wrote a manual for storing website emails with Gmail, though there are many other options. But we still need to create the email account.

Picture 7
Now, since I’m using Cloudflare, I have to go to the DNS options and copy all the MX and TXT fields (DKIM, SPF…) to the Cloudflare’s DNS settings.

Picture 8
I am confused with the point (4) in picture 8: the “x.” before domainkey. Not sure if it’s some sort of a mistake.
5. DNS / nameserver change
Those using Cloudflare (or some other DNS service) should now put the DirectAdmin server IP to the appropriate fields. For the others – edit nameservers to use those of the new hosting server on your domain registrar.
6. “Installing” SSL / TLS certificates
For those using Cloudflare, I explained how to set Cloudflare DNS and Crypto options for this to work.

Picture 9
Aaaand… this didn’t work! 🙂 I’ll have to publish this on-line in hope someone more experienced will tell me what I did wrong and how to handle the cPanel to DirectAdmin website migration. Either server’s WAF is blocking Cloudflare, or, more probably, I did something wrong.
Update 9th July 2019: Editing Cloudflare Crypto options to “Full”, disabling “Always use HTTPS” and “greying” the domain clouds in DNS options did the trick. SSL installed successfully. However, the website is still not working, for some reason. Will look into it.
Update 28th August 2019: PHP was the problem. It was not working from within public_html directory, but only within a separate php directory. A strange setup by the provider, I hope it’s not something usual. Works with the other tested DirectAdmin accounts.
7. My first DirectAdmin personal impressions
So far a have managed to move dozens of websites from one cPanel account to another cPanel account /server. Also moved some from CentOS control panel – to cPanel. DirectAdmin has its peculiarities. I wrote in a bit more details about my “complaints” in the post about DirectAdmin reseller hosting account setup.
Until it is all “polished” I’ll be (not very) happy to pay extra 0.25 $ per cPanel until I figure all this out – and see where the prices and hosting providers “land”, as well as which control panel becomes the most popular / wide spread. Also, will see about DirectAdmin pricing in a few months time. Though I will keep “practicing” with DirectAdmin.
Before the cPanel price rise, I was looking for alternative (cheaper / free) solutions. The answers from most experts were there’s nothing reliable / good enough for client shared hosting servers. Don’t see many things changed in time, except for the cPanel price. But now it seems the alternative options are not so bad after all? From my experience, as a “normal user”: CentOS and DirectAdmin for one are still “problematic” and need polishing.
This is just the first, personal impression. I’m sure in time, when I figure things out and get used to it, I’ll be able to form a more objective opinion – either changing, or confirming what I wrote in the previous paragraph. We’ll see.