How to manually transfer a cPanel account to a new hosting provider

In case you are wondering why should you move an account manually when you can just use the WHM Transfer feature, you might want to know or notice at a later time that some accounts are too large to be able to move using that script so doing it manually is the only way to go.

Let’s begin!



We use the following user data for our tutorial:

Username test

Create a temporary directory with the mkdir command

Run the mkdir command to create your temporary directory:

mkdir /home/test-temp


Create an archived backup of the public_html directory

To create a compressed backup, run the tar command:

tar cvzf /home/test-temp/user-backup23.tar.gz /home/test/public_html


Move public_html with the mv command

To move the public_html directory to the temporary folder that you made, run the following mv command:

mv /home/test/public_html /home/test-temp/


Create compressed backups of logs

Big websites usually create very large log files. To save yourslf the time and disk space, make a compressed backup of this data. The /usr/local/apache/domlogs directory stores the domain’s Apache weblogs.

To create a compressed backup of the domain’s weblogs and move the weblogs from the /usr/local/apache/domlogs directory to the temporary directory, run the following two commands:

 tar -cvzf /home/test-temp/test-logs.tar.gz /usr/local/apache/domlogs/
 mv /usr/local/apache/domlogs/ /home/test-temp/


 Manually transfer the compressed backups with the scp command

Several ways exist to move compressed files after you have created them. The secure copy (scp) protocol transfers data between servers quickly and securely without the use of arguments.

To manually transfer compressed archives, run the scp command:

scp $local file to move $remote host:/path/to/new/file

For example, to transfer compressed files to the /home/temp/ directory, run the following commands:

 scp /home/test-temp/test-logs.tar.gz
 scp /home/test-temp/test-backup.tar.gz

These two commands transfer the compressed backups that you create of the user’s public_html directory and Apache weblogs to the /home/temp/ directory of the new server. The system will prompt you for the password when you connect to the new server.

  • You can now use the WHM Transfer Tool interface to move the rest of the account information.


Extract the compressed backups

After you transfer the two compressed backups and finish the transfer of the account, extract the compressed files to their appropriate locations. To extract the compressed backups to their appropriate locations, run the following command:

tar -xvzf $file-to-extract.tar.gz $/path/to/place/contents/

This command uses the -x argument instead of the -c argument. The -x argument tells the tar utility to extract information from the specified files.

To restore the user’s public_html directory to the /home/test directory and extract the Apache logs to the /usr/local/apache/domlogs directory, run the following two tar commands:

 tar -xvzf /home/temp/test-backup.tar.gz /home/test/
 tar -xvzf /home/temp/test-logs.tar.gz /usr/local/apache/domlogs/


Good luck and many transfers without any incidents!

Leave a Reply