wesupport

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Manually Migrate Accounts to cPanel/WHM – How to do

by | Mar 14, 2021

Wondering how to manually migrate accounts to cPanel/WHM? We can help you.

It is possible to migrate accounts from unsupported third-party control panels to cPanel & WHM with some customization of unsupported services to use them on cPanel & WHM.

Here at Bobcares, we perform migrations for our customers as part of our Server Management Services.

Today let’s see how our Support Engineers manually migrate accounts to cPanel/WHM.

Steps to Migrate Manually Migrate Accounts to cPanel/WHM

Before migrating the accounts, we must perform the following steps:

1. Adjust DNS records

Decrease DNS records’ Time To Live (TTL) on all of the account’s domains.

It is better to perform these steps a few days before we begin the migration process.

2. Installation

During the installation process, we must select a hostname and main IP address for the new server. The system uses these settings to configure the DNS zone files for restored accounts.

Steps to Migrate the files

After the creation of the new cPanel & WHM account, we can migrate the old server’s files and directories to the appropriate locations on the new server.

1. Firstly, backup everything on the server, found in the control/admin area.
2. Then download all files and directories, maintaining the exact same structure.
3. After that we can backup all databases associated with the sites.
4. Once we complete backing up, we can download it.
5. After that log in to the cPanel account that we are moving to and go to cPanel’s File Manager or connect via FTP.
6. Upload the directories and files to the public_html folder.
7. From the MySQL Database Wizard we can create a new database and user.
8. Note the username and password.
9. Assign the user to the database and assign All Privileges.
10. After that, Import the database from PHPMyAdmin.
11. Take the wp-config and edit db_name, db_user, db_password, and db_host
12. Finally, if the site is working correctly, we can change nameservers with the domain registrar to the domain nameservers provided.
13.We must wait 48 hours before canceling the old hosting and before doing so ensure that the site is loading correctly from our new hosting

 Files and directories to migrate during this process:

Following are some of the files and directories which we will be copying while migrating the accounts.

The cPanel & WHM supports Apache, BIND, Exim, and Mailman.

The public_html directory

The public_html directory contains all of the files, directories, subdirectories, and content. In other words, this directory may appear as the /home/user/www directory or the /home/user/vhost directory depending upon the system.

The user must own the files and subdirectories in this directory.
And subdirectories in this directory must possess 755 permissions and files in this directories must possess 644 permissions.

We can see this from the following example:

drwxr-x--- 7 user nobody 4096 Jan 11 08:35 ./
drwx--x--x 41 user user 4096 Mar 14 02:18 ../
drwxr-xr-x 2 user user 4096 May 20 2014 cgi-bin/
drwxr-xr-x 2 user user 4096 Sep 4 2014 entropybanner/
-rw-r--r-- 1 user user 2 Jan 11 08:35 example.html
drwxr-xr-x 2 user user 4096 Jul 16 2013 scgi-bin/
The mail directory

All of the email files for all of the cPanel account’s email accounts will be available in /home/user/mail directory contains

Moreover, it includes email accounts for any addon domains, parked domains, and subdomains.

Users who migrate data to cPanel & WHM servers must convert any mbox data to the Maildir format.

We can see this from the following example:

<drwxr-x--x 9 user user 4096 Jun 8 2015 ./
drwxr-x--x 3 user user 4096 Apr 28 2014 ../
-rw-rw---- 1 user user 43 Apr 30 2014 courierimapacl
drwxr-x--x 2 user user 4096 Apr 28 2014 cur/
drwxr-x--x 5 user user 4096 Apr 28 2014 .Drafts/
drwxr-x--x 5 user user 4096 Apr 28 2014 .Junk/
-rw-r----- 1 user mail 18 Jun 30 2014 maildirsize
drwxr-x--x 2 user user 4096 Apr 28 2014 new/
drwxr-x--x 5 user user 4096 Apr 28 2014 .Sent/
drwxr-x--x 2 user user 4096 Apr 30 2014 tmp/
drwxr-x--x 5 user user 4096 Apr 28 2014 .Trash/
The tmp directory

The /home/user/tmp directory contains the account’s temporary files and bandwidth and statistics data. For example, we can migrate our original server’s AWStats data to the /home/user/tmp/awstats directory.

drwxr-xr-x 11 user user 4096 Mar 2 12:26 ./
drwx--x--x 41 user user 4096 Mar 14 02:18 ../
drwxr-xr-x 3 user user 4096 Apr 18 2015 analog/
drwxr-xr-x 3 user user 4096 Apr 18 2015 awstats/
drwxr-xr-x 2 user user 4096 Sep 6 2013 cpbandwidth/
drwx------ 2 user user 4096 May 12 2014 cpcsvimport/
drwx------ 2 user user 4096 Jun 9 2015 horde/
drwxr-xr-x 2 user user 4096 Oct 22 2014 logaholic/
drwxr-xr-x 3 user user 4096 Oct 30 2014 pear/
drwxr-xr-x 3 user user 4096 Apr 18 2015 webalizer/
drwxr-xr-x 2 user user 4096 Oct 22 2014 webalizerftp/
The etc directory

The /home/user/etc directory contains the email account password, shadow and quota files for email accounts. For example, we can migrate our original server’s email account quota data to the /home/user/etc/quota directory.

drwxr-x--- 5 user mail 4096 Oct 21 10:23 ./
drwx--x--x 41 user user 4096 Mar 14 02:18 ../
drwx--x--x 3 user user 4096 Apr 22 2014 passwd/
-rw-r--r-- 1 user user 0 Apr 22 2014 quota
-rw-r--r-- 1 user user 9 Feb 4 09:33 cacheid
drwxr-x--- 5 user user 4096 Mar 12 03:11 shadow/
The ssl directory

The /home/user/ssl directory contains the SSL certificates for the domains on the account.

After migrating the SSL certificates, we must activate them in the Manage SSL Hosts section of WHM’s Manage SSL Hosts interface (WHM >> Home >> SSL/TLS >> Manage SSL Hosts).

drwxr-xr-x 5 user user 4096 Aug 3 2015 ./
drwx--x--x 41 user user 4096 Mar 14 02:18 ../
drwx------ 2 user user 4096 Feb 16 2015 certs/
drwx------ 2 user user 4096 Feb 16 2015 csrs/
drwx------ 2 user user 4096 Mar 25 2015 keys/
The mysql directory

The MySQL directory stores the MySQL databases for every account on the server.

We must create the empty database on the account first and then restore it to that new database.

drwxr-x--x 30 mysql mysql 4096 Mar 14 02:57 ./
drwxr-xr-x 26 root root 4096 Nov 11 03:11 ../
drwx------ 2 mysql mysql 4096 Jun 17 2014 apitest_hammock_r_d/
drwx------ 2 mysql mysql 4096 Jun 17 2014 apitest_jason/
drwx------ 2 mysql mysql 4096 Jun 17 2014 apitest_newestaddition/
-rw-rw---- 1 mysql mysql 16384 Feb 20 03:07 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 Feb 20 03:07 aria_log_control
-rw-rw---- 1 mysql mysql 56 Feb 11 2015 auto.cnf
The pgsql directory

The /var/lib/pgsql directory stores the PostgreSQL databases for every account on the server.

drwxr-x--x 30 pgsql pgsql 4096 Mar 14 02:57 ./
drwxr-xr-x 26 root root 4096 Nov 11 03:11 ../
drwx------ 2 pgsql pgsql 4096 Jun 17 2014 apitest_hammock_r_d/
drwx------ 2 pgsql pgsql 4096 Jun 17 2014 apitest_jason/
drwx------ 2 pgsql pgsql 4096 Jun 17 2014 apitest_newestaddition/
-rw-rw---- 1 pgsql pgsql 16384 Feb 20 03:07 aria_log.00000001
-rw-rw---- 1 pgsql pgsql 52 Feb 20 03:07 aria_log_control
-rw-rw---- 1 pgsql pgsql 56 Feb 11 2015 auto.cnf

 

Common errors while migrating accounts to the cPanel server

Now let’s see how our Support engineers fix the common errors faced while migrating.

1. File permission

Usually, we end up experiencing website errors after migrating from an old server to a new server.

Mainly, this may happen due to incorrect permission and ownership of directories or files that set up in the destination server.

To fix this we have to ensure that file permission and ownership are correctly given.

We can check this using the commands given below:

find /home/<cpuser>/public_html/ -type f -exec chmod 644 {} \;
find /home/<cpuser>/public_html/* -type d -exec chmod 755 {} \;
2. Large Mailboxes

Similarly, while migrating large mailboxes customers we can face problems like timeout errors. By default, imapsync often causes timeouts when the migration process continues for a longer period.

To avoid these timeout errors,  we can switch off the computation of statistics using the following command:

--nofoldersizes --skipsize --fast

 [Need assistance to Migrate? – We are available 24*7]

Conclusion

In short, we saw how our Support Techs manually migrate accounts to cPanel/WHM, along with steps to fix common errors faced while migrating.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags