How to Prevent Downtime when Migrating from cPanel to ISPConfig?

How to Prevent Downtime when Migrating from cPanel to ISPConfig?

cPanel and ISPConfig are two popular control panel software. People often switch to one or the other. But it leads to downtime. That’s because the website directory structure for cPanel is different from ISPConfig. So it takes time to covert the structure when making the switch.

What are the Challenges Associated with migrating websites from cPanel to ISPConfig?

When you’re migrating from cPanel to ISPConfig or vice versa, you’d have to take note of the challenges you’re going to face during the process.

As already mentioned, differences in website directory structure is one issue. The websites have the files in different locations. For example, in case of cPanel, the website is located in the /home/user/public_html folder, whereas it’s located in /var/www/www.domain.com in case of ISPConfig.

Likewise, there are differences in database name format as well. For cPanel, the database format will be username_db_name. So you will not be able to take direct backup and restores from cPanel or WHM.

To make the matter more complicated, there are no tools that can help you migrate from cPanel to ISPConfig.

How to Migrate a Website from cPanel to ISPConfig?

If you ever have to deal with migrating your website from cPanel to ISPConfig, here’s how to do it to avoid downtime:
  • Login to your cPanel dashboard
  • Go to Backup Wizard and create a backup of the website
  • Now download the backup to the server
  • Once the download is successful, you will get an email notification containing the email address
  • Next, log in to the ISPConfig dashboard
  • Go to Client > Add new Client
  • Add the details like name, company name, username, and set a password. Then click on Save
  • Click on Sites tab > Add new website to do is add the website information.
  • Provide the details like Client, Domain, Traffic Quota, and other fields. Click on Save
  • From the left-hand side menu, click on Add new Shell-User. You need to set up a shell user before proceeding. Fill out the necessary fields and then click on Save
  • Next, login to the server using necessary credentials and download and extract the content. Use this command for that purpose
Code:
tar -xvf homedir.tar
  • Lastly, copy the content of the public_html folder into the website directory at /var/www/www.domain.com
That’d migrate the website from cPanel to ISPConfig. In case of single accounts, you can try compressing the public_html to a zip file. Use the File Manager inside cPanel for that purpose.

Migrating database and email accounts

After you’ve migrated the website, you need to migrate the database and email accounts as well. So you have to create a new database and import the necessary SQL into it. Use the following syntax for this purpose:

Code:
mysql -u [username] -p [database name] < [dataImport.sql]
The next thing you need to do is edit the Config file. Within this file, you have to update a few things, including database name and password.

Also, to copy mailboxes from cPanel to ISPConfig, you have to use lmapsync.

When executing the migration, you have to match the existing PHP and the web server settings. These should be same for both the old and new control panels.

Common Errors while Migration

When migrating from cPanel to ISPConfig, you may face some errors. These are commonly raised by admins. It’s better if you’re aware of these issues so that you can take the necessary steps.
  • PHP modules are missing
When certain PHP modules are missing, you will get errors like these:

Code:
[WARN] SOAP ERROR in API call (client_add): Call to undefined function dl()
If you get that error, you need to use the loncube modules. So install these modules on the destination server to fix the problem.

Besides that, some users have incompatible mysql mode enabled. It’d block you from adding new clients in ISPConfig.

In that case, you need to update the my.cnf file and change the sql_mode as following:

Code:
sql_mode=NO_ENGINE_SUBSTITUTION
The bottomline is you always have to proactively keep the two server consistent when attempting the migration.
  • Incorrect permission and ownership
When the permission and ownership details aren’t set up correctly, you’re likely to get errors.

You should always have the default file permission set to 644 and directory to 755. Any other figure will lead to permission issues.

So update the numbers to resolve the issue.

So that’s how you prevent downtime when migrating your website from cPanel to ISPConfig. For further assistance, contact the hosting support team.
Author
kumkumsharma
Views
157
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top