Copy a cPanel instance to another account with rsync commands

To copy a cPanel instance from one account to another using rsync, you will need to have ssh access to both accounts. You can then use the rsync command to copy the files and directories from the source account to the destination account.

Here is the general syntax for using rsync to copy a cPanel instance:

rsync -avHP /home/source_username/public_html/ /home/destination_usernamen/public_html/

Replace source_username with the username for the source server. You will also need to specify the destination path, which is /path/to/destination/ in this example. This should be the path on the destination server where you want to copy the cPanel instance.

This next command will preserve file permissions:

chown -R devrenas. /home/source_username/public_html; chgrp nobody /home/destination_username/public_html

If there is a database to transfer over to, you can copy the database with this command. Just be sure to update the database name.

mysqldump source_dbname | mysql destination_dbname

Note that this process may take some time, depending on the size of the cPanel instance and the speed of your connection.

If you have moved a database over during the transfer, you will need to manually update wp-config.php with the new database password and name. The below commands will update all references to the old URL with the new URL. These commands will need to be run as the destination user and require WP Silly to be installed. An alternative method would be to run SQL commands directly in phpMyadmin

wp search-replace --all-tables --skip-columns=guid --skip-plugins --skip-themes --precise :// ://

wp search-replace --all-tables --skip-columns=guid --skip-plugins --skip-themes --precise :// ://

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles


You can now add markdown to support tickets at Thexyz. Emphasis **bold** *italics*...

How to edit the htaccess file

The htaccess file is found at the root of your website's files. To access your website files you...

MySQL commands to speed up your WordPress database

phpMyAdmin is the most common way to manage a WordPress database. It is important to backup and...

Setting up WebDav with Nextcloud and ownCloud

ownCloud 10 introduced some changes to connecting with WebDav. This tutorial will show you how to...

How to change Roundcube Webmail Password

To change your email account password to Roundcube Webmail with our Hepsia servers please follow...