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.
- 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:
Next screen shows option for choosing the database name, username and a password for accessing the database:
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 this DirectAdmin shows /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.
Then I’m unpacking files:
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.
After this, I did phpMyAdmin database import.
4. Creating email accounts
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.
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.
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.
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.
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. But I have not managed to do it from cPanel to DirectAdmin. For now at least.
Sure it is for my lack of knowledge and experience. Will get the hang of it – in time. Not sure how this will “play” for the technical support of providers who switch to DirectAdmin. Also, I wouldn’t like a control panel with which I depend on support to do the migrations – though I suppose not all the people are like that.
Will 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.
Until then, will try to figure it out and make it work.
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 “problematic”.
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.