How we migrated servers with a free control panel to cPanel

About the Client

The client provides Web Hosting services on Linux and Windows servers globally using various hosting control panel platforms. The client is one of the Top5 web solution companies in India.


There are many servers with free Control Panels that are below par in ease of use, functionality, security, and integrity. Generally, cPanel is one of the world’s most popular web hosting control panels and web hosts simply love cPanel when it comes to the services they offer. So the client approached us to execute the following jobs.

* Migrate Unsupported Control Panel servers to a cPanel server.

* Migrate existing accounts to a new cPanel server with 0% data loss and minimum downtime.

Initial evaluation

We have evaluated the source server to determine whether we can migrate it’s contents successfully to the new cPanel server. We analyzed the resources like disk space, operating system version, system software versions, database versions, memory, CPU usage and network connection between the source and target servers.

Prior to initiating the file transfer, we built the same source software infrastructure like similar versions of Apache, MySQL and PHP (including modules, extension) in the new server and performed the required hardening and optimizations.


* The client has multiple non-control panel servers hosting over 100 plus sites and we needed to migrate it with zero percentage data loss and less down time.

* Email formats were different from Maildir and we needed to create virtual FTP accounts and email accounts in cPanel server.

* Some of the servers had different MySQL versions and there were Tomcat hosted sites too.

* Needed to ensure the directory and file permissions, .htaccess rules of each domain.

* The old servers were lacking needed security recommendations.

* After the migration was completed, we had to cross-check and verify the domain’s working, web file size, database count and size, email accounts count and size, DNS records, FTP accounts and setting, domain related settings etc

The Activelobby Difference

Please note that cPanel built in transfer tools support panel like Plesk, Ensim etc but since there are wide free panels offered, the risk of migrating to the panel like cPanel involves manual task and inorder to minimise the effort, we automated it with needed bash scripts and utilized cPanel built-in WHM API scripts. Another challenging case is assigning a dedicated IP address for some of the domains, here we have done the IP mapping process.

We decided to follow the below steps to complete the migration :

1: Our team created 4 custom bash scripts to perform this task.

2: First script is to collect the domain names from the source server

3: Create the domain list in the destination server (cPanel) and create all of the domains using the bash script (use cPanel script /script/wwwacct or WHM API scripts).

4: Copy the document root from source to destination using rsync (use bash script to migrate whole accounts) (If the size is large, you can skip it to the last)

5: List out the email accounts from source and create the email accounts using “/scripts/addpop” (We can create bash script for that) in the destination server.

6: Migrate the emails using the imapsync tool and fix the email permissions

7: List Out the DBs and DB users from source and create the same in the destination using the cPanel API

8: Backup the DBs from the source to destination and restore using bash script

9: Edit the configuration files like in WordPress, Joomla etc. if any DB  name changes.

10: Confirm the domain working via local end hosts entry. After the confirmation, change the DNS to the new server by lowering the TTL value.


Completed the whole migration task within the recommended time with minimal manpower.

The scripts automated the entire process

Post-migration issues were minimal after migration.

Tools Used

Bash Scripts: We used custom bash scripts to automate the migrations.

cPanel scripts to create domains and email accounts.

IMAP Sync for cPanel plugin to migrate the emails.


What is a Web Hosting Control Panel?

Web hosting control panel is a software-based web interface that provides a Graphical User Interface(GUI) and automation tools that could easily manage the web hosting by the end-users and website owners.

What is cPanel?

cPanel is a popular web hosting control panel. cPanel provides a GUI and automation tools which are designed to simplify the process of hosting a website.

Which are the tools and techniques used to accomplish migration to cPanel?

Bash Scripts, cPanel scripts, IMAP Sync are some of the tools used in the migration process.

What are the conditions to be analyzed before migration from source to target?

Prior to migration factors to be analyzed includes the resources like disk space, operating system version, system software versions, database versions, memory, CPU usage, and the network connection between the source and target servers.

Leave a Reply