After you create an addon domain, you can create an entirely new account from that addon domain. To do this, copy the information from the addon domain and add it to a newly-created account. This tutorial shows you how to copy addon domains to a new account.
In cPanel & WHM version 56 and later, do not use the method in this document. Instead, use WHM's Convert Addon Domain to Account interface (Home >> Transfers >> Convert Addon Domain to Account).
Copy addon domains to a new account
Perform the following steps to copy an addon domain to a new account:
root user, or resellers with
root-level privileges, can perform this action because it requires that you move files.
In this document:
usernamerepresents the user of the account.
newusernamerepresents the user of the new account.
addonnamerepresents the name of the addon domain.
addondirectoryrepresents the directory for the addon domain.
Create a new account with a placeholder name in WHM's Create a New Account interface (Home >> Account Functions >> Create a New Account).
Do not use the addon domain's name for the new account.
Perform the following steps to extract the backup that you created in the previous steps:
Run the following command to create the
Run the following command to move the backup file into the
Run the following commands to change to the
/home/backup-username directory and uncompress the backup:
This commands extracts the backup to either the
Run the following command to add the
homedir/public_html/addondirectory/ subdirectory to the
Perform the following steps to import the databases:
newusernameto the databases when you create them. For example,
dbnamerepresents the name of the database.
After you create the databases and database users, import each domain's database backups. To do this, run the following command for each backup:
Perform the following steps to update the cron paths for the new account:
/home/backup-username/username/cron/usernamefile and check for the addon domain's crons.
Add the paths for the addon domain's cron jobs to the new account in cPanel's Cron Jobs interface (Home >> Advanced >> Cron Jobs).
Make sure that the cron jobs' paths match the new account's paths to the same cron jobs files.
chown command to grant ownership of the copied
public_html files to
After you change the files' ownership, confirm that the account functions correctly. To do this, point your operating system's
hosts file to the temporary domain placeholder. For information about how to set the
hosts file for your operating system, read Wikipedia's hosts file article.
After you remove the old account's addon domain, navigate to WHM's Modify an Account interface (Home >> Accounts >> Modify an Account) and change the new account's main domain name to the addon domain's name.
After you change the domain name, copy the old account's emails, forwarders, filters and auto responders to the new account. To do this, open the
/home/backup-username/username directory and run the following commands:
After you copy the emails, forwarders, filters and autoresponders, change the ownership of those files to the new user. To do this, run the following commands:
Make certain that you append asterisks (
* ) on either side of
addonname to ensure that it keeps the wildcards.
After you change the ownership of the files, confirm that you can log in to the user's Webmail account.
Navigate to the
/home/newusername/etc/addonname directory to find the users and email passwords for authentication to IMAP, POP3, and Webmail.