cPanel to DirectAdmin migration – How to do it without downtime
by Jilu Joseph | 01 July , 2019
Hosting providers often need to change their control panel due to business reasons.
And, the search for an alternative for cPanel control panel often ends up in DirectAdmin. To make the systems work, we need to do cPanel to DirectAdmin migration.
Often due to PHP version compatibility or problems with directory permissions, there can be errors while doing a migration from older server to new server.
That’s why, at Bobcares, we often get requests from our customers to migrate cPanel to DirectAdmin as part of our Server Migration Services.
Today, we’ll see how our Migration Engineers do properly planning to migrate accounts from cPanel and fix related errors.
How we do migration from cPanel to DirectAdmin
Migration can always be risky as it involves live websites. That’s why, while doing migration, our Migration Engineers always do it carefully and with proper planning. Any single mistake can result in website errors or data loss.
In general, there are two ways to do cPanel migration. One is via DirectAdmin panel and the other one is via command line. Let’s now check these methods in detail.
1. Migration via DirectAdmin control panel
Migrating from cPanel to DirectAdmin is a multi step process. DirectAdmin will not accept the cPanel backups in its native format. Therefore, we need to covert the backups to be acceptable by DirectAdmin.
a) Backup conversion
Luckily, there are backup conversion scripts readily available at Github . For example, one of the scripts that can convert the cPanel backup to DirectAdmin would be da.cpanel.import.pl
We copy the cPanel user backups into the DirectAdmin server. Then, our Migration Specialists modify the file defaults.conf to match the DirectAdmin destination server. Then, we execute the command to convert the backups as:
We, then copy the converted backup content to the folder /home/admin/user_backups.
b) Restore from DirectAdmin panel
Now, we can restore the backups via DirectAdmin panel.
For this, we login in the destination DirectAdmin Panel and go to Admin Tools > Admin Backup > Restore option .
Here, we set the path of the folder that contain the converted backups. In our case, it will be /home/admin/user_backups .
We, then choose the IP address details and proceed to the next step. DirectAdmin will now show the list of accounts available for restore. We choose the specific account backup and just follow the on-screen instructions and that completes the migration. Usually, the time for migration depends largely on the size of the accounts on the server.
Most of the time, the migration via DA panel work flawlessly. However, some customers may experience errors while migrating cPanel to DirectAdmin too. This can be due to network errors, backup errors, connectivity problems and so on. And, it can end up in troubles like data loss or database crash. Therefore, our Migration Engineers opt for cPanel to DirectAdmin migration via command line.
2. Migration via command line
Here, we take the following steps to migrate the cPanel accounts via command line.
- Initially, we take the back up of cPanel account which need to migrate by log into the cPanel account. And, we use Backup Wizard option in the cPanel to take the backup.
Or, we run the following command to take the cPanel backup via command line.
- Once the backup packaging is complete, we either download this .tar.gz file onto the desktop or server itself.
If you want to download the backup file to the server, we use a temporary URL or FTP method.
Then, we log into the DirectAdmin control panel and create the account.
After that, we log into the server as a root user and create a directory inside the home directory.
Next, we download the backup file via a temporary URL and extract the file there, all the data from your cPanel account will be the resulting files.
We find the website contents, homedir from the list and move the files to the corresponding Document root, public_html folder of the domain.
Also, we restore the database associated with the domain too.
At last, we check the ownership and permission too, if needed we correct both for the proper working of websites.
In every migration, there comes the need to match up the existing PHP, web server settings on the new server. After copying the accounts, we do a preview check of the domain using temporary URL.
And, when we are satisfied with the working of the website from the new server, we make DNS changes. Here, our Migration Engineers make DNS settings change well in advance. That would take the website to the new server without any downtime.
How we fixed migration related errors
From our experience in managing servers, we’ve seen customers facing problems after migration. Let’s take a closer look at how our Migration Engineers fixed these problems.
1. Version compatibility
In general, versions of software running on both source and destination servers should match. These incompatibility can create many errors in migration.
Recently, one of the customers reported a website error after migrating cPanel account to DirectAdmin. He was getting a blank page on his website.
On checking, our Migration Engineers found that the problem was due to the PHP version of the site. Sometimes, this error can happen due to missing software versions or extensions. Again, it can be a result of version mismatch of the programs running on an old and new server. This may lead to errors in the website.
So, we solved the error by setting the PHP version in the new server to match that of the old server.
2. Incorrect permission and ownership
Often, customers may get website errors after migrating the old server to the new server. Also, this can be because of the incorrect permissions and ownership of the directories or files that set up in the new server.
Also, after migrating the site between different control panels, the ownership and permissions of migrated site files and directories must be corrected. Again, the default file permission should be 644 and the directory should be 755.
In every migration, our Migration Experts ensure that the provided permissions and ownership are correct. If there are wrong permissions, we correct them and make the website work.
[Looking for a trouble-free migration from cPanel to DirectAdmin? Our Migration Specialists can do it for you.]
In short, DirectAdmin is one of the cheapest control panels and is famous for its simplicity and user-friendliness. Today, we saw how our Migration Engineers migrate cPanel to DirectAdmin without website downtime. We discussed on the migration errors and their fixes too.
Migrate cPanel to a new platform!
Looking for changing infrastructure of your server? Let us help you.
Our migration experts can migrate all your accounts to a new platform without data loss.