Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

Duplicate a Site in cPanel/WHM

Written by: on 08 September 2014 11:07 AM 08 September 2014 11:07 AM

Quick guide on how to duplicate a site in cPanel or WHM. Simple steps to duplicate a cPanel account into another.

WHM doesn't provide an easy way to duplicate a website/account. The only way to do this is to:

 

Take a backup of the existing site in shell
SSH into your server, see: https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh

Type: /scripts/pkgacct username

* where username is the username of the account you wish to duplicate

In WHM -> Account Functions -> Modify Account, change the domain name of the account to which you need to duplicate. Also change the username. Make sure you change these to the NEW duplicate site you want. You MUST change the username as well as the domain name.

Now you can restore your original site.

SSH into your server, see: https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh

Type: /scripts/restorepkg username

* the username is the previous original username of the account

You will now have two duplicate accounts. However, any scripts using databases in the new site will need to have their database connections updated (e.g. if a wordpress site in wp-config.php) to use the new account name prefix for the database and username.

(8 vote(s))
Helpful
Not helpful