1 / 19

Copying Addon Domains to a New Account

An entirely new account can be created from an addon domain. For this purpose, the addon domainu2019s information needs to be copied and added to the newly-created account.<br>

htshosting
Download Presentation

Copying Addon Domains to a New Account

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Copying Addon Domains to a New Account

  2. Table of Contents • Change File Ownership • Confirm the Functioning of the Account • Remove the Addon Domain • Change the Placeholder Domain’s Name • Copy Over Email Account Information • Change the Ownership of Files • Log in Confirmation • Introduction • Example Values • Create a Backup File • Create a New Account • Extract the Backup File • Extract the Backup File (Continued) • Import the Databases • Update Cron Job Paths

  3. Introduction • Once you have created an addon domain, an entirely new account can be created from that addon domain. For this purpose, the information from the addon domain needs to be copied and added to a newly-created account. • The following slides will run you through the steps involved in copying addon domains to a new account. The information that has been provided here is valid for only version 54 and the earlier versions of cPanel & WHM. The Convert Addon Domain to Account interface of WHM needs to be used for cPanel & WHM version 56 and later. • WHM >> Home >> Transfers >> Convert Addon Domain to Account • It needs to be mentioned here that only the root user or those resellers, who have root-level privileges, will be able to carry out this action, as it requires moving files.

  4. Example Values The below-mentioned example values are used in the information contained in the following slides. • username – It represents the account’s user. • newusername – It represents the new account’s user. • addonname – It represents the addon domain’s name. • addondirectory – It represents the addon domain’s directory. • To digress, the facility to register and transfer domains is provided by many web hosting companies, such as HTS Hosting. HTS Hosting has been consistently referred to as the “Best Web Hosting Company”, the “Best Cloud Hosting Company”, etc. due to the high quality of service offered by it at affordable prices.

  5. Create a Backup File • Carry out full backup of the account which contains the addon domain. Use the Backups interface of cPanel (cPanel >> Home >> Files >> Backups) for this purpose, or run the following script: /usr/local/cpanel/scripts/pkgacct

  6. 1-800-123 -8156 Whoa! That’s a big number, aren’t you proud?

  7. Create a New Account • Create a new account that has a placeholder name in the Create a New Account interface in WHM. • WHM >> Home >> Account Functions >> Create a New Account • It needs to be mentioned here that you should not use the name of the addon domain as the new account name.

  8. Extract the Backup File The below-mentioned steps need to be performed to extract the backup file. • Create the /home/backup-username directory by running the following commands: • mkdir /home/backup-username • mv cpmove-username.tar.gz /home/backup-username/ ! Then move the backup file into it. • Navigate to the /home/backup-username directory by running the following commands: • tar -xzf cpmove-username.tar.gz • cp /home/backup-username Then the backup needs to be uncompressed. It needs to be mentioned here that the above-mentioned commands extract the contents of the backup file to either the cpmove-username or username directories.

  9. Extract the Backup File (Continued) • Run the following command: • cp -R homedir/public_html/addondirectory/* /home/newusername/public_html/ • This command adds the homedir/public_html/addondirectory/ subdirectory to the /home/backup-username/public_html/ directory.

  10. Import the Databases Carry out the following steps to import the databases: • Recreate the databases of the addon domain and create the database users in the MySQL Databases interface in cPanel. • cPanel >> Home >> Databases >> MySQL Databases Prepend newusername to the databases at the time when you create them. An example of this is when you create the newusername_dbname file. In it, dbname represents the name of the database. • Import the database backups of each domain, after creating the databases and database users. For this purpose, you need to run the below-mentioned command for each backup. mysqlnewaccount_dbname < /home/backup-username/username/mysql/username_dbname.sql

  11. Update Cron Job Paths You need to carry out the following steps for updating the new account’s cron paths: • Open the /home/backup-username/username/cron/username file. Then check for the cron jobs of the addon domain. • Add the paths for the cron jobs of the addon domain to the new account in the Cron Jobs interface in cPanel. cPanel >> Home >> Advanced >> Cron Jobs You need to ensure that the paths of the cron jobs match the paths of the new account to the same cron jobs files.

  12. Change File Ownership • The chown command needs to be used in order to grant ownership of the copied public_html files to the newusername user. • find /home/newusername/public_html -uid 0 -exec chownnewusername:newusername {} +

  13. Confirm the Functioning of the Account • You must confirm that the account functions properly after any change in the ownership of the files. To ensure this, you have to point the hosts file of your operating system to the temporary domain placeholder.

  14. Remove the Addon Domain • Remove the addon domain of the old account in the Addon Domains interface in cPanel. cPanel >> Home >> Domains >> Addon Domains

  15. Change the Placeholder Domain’s Name • Navigate to the Modify an Account interface in WHM. WHM >> Home >> Accounts >> Modify an Account • Next, change the main domain name of the new account to the name of the addon domain.

  16. Copy Over Email Account Information Change the domain name. After that, copy the emails, forwarders, autoresponders, and filters of the old account to the new account. For that purpose, you need to open the /home/backup-username/username directory and then run the following commands: • cp va/addonname /etc/valiases/ • cp vf/addonname /etc/vfilters/ • cp homedir/.autorespond/*addonname* /home/newusername/.autorespond/ • cp -R homedir/etc/addonname /home/newusername/etc/ • cp -R homedir/mail/addonname /home/newusername/mail/

  17. Change the Ownership of Files • Once you have copied the emails, filters, forwarders and autoresponders, you need to change the ownership of those files to the new user. You should run the following commands to attain that: • chownnewusername:mail /etc/valiases/addonname • chownnewusername:mail /etc/vfilters/addonname • chownnewusername:newusername /home/newusername/.autorespond/*addonname* • find /home/newusername/etc -uid 0 -exec chownnewusername:mail {} + • find /home/newusername/mail -uid 0 -exec chownnewusername:mail {} + You should append asterisks ( * ) on either side of addonname to ensure that it keeps the wildcards.

  18. Log in Confirmation • You need to confirm that you can log in to the Webmail account of the user after you have changed the files’ ownership. • Navigate to the /home/newusername/etc/addonname directory and find the users as well as the email passwords for authentication to Webmail, IMAP, and POP3.

  19. Thanks! ANY QUESTIONS? www.htshosting.org

More Related