Fli
05-08-2016, 03:23 PM
What to do to move an addon domain from one cPanel to another cPanel?
Main things that need to be transfered: FILES, MySQLs, EMAIL accounts, CRONjobs
Do not use this tutorial if your addon domain have subdomains, they are not taken into account in this tutorial. Subdomains have to be created manually on destination cPanel and then its files copied and then its mysqls created, mysql data imported and PHP script configuration file modiffied to reflect new mysql credentials.
In the following tutorial, you will see example line:
source cPanel / Addon Domains
it means that you should login the cPanel account from which you are transfering the addon domain and then go to Addon Domains section in your cPanel.
---------------- PREPARE YOURSELF ----------------
You will need access to the source and destination cPanel. Open notepad and copy following three lines into it:
addon domain: yourdomain.com
source cpanel: SOURCECPANEL
destination cpanel: DESTINATIONCPANEL
(modify SOURCECPANEL, DESTINATIONCPANEL to reflect your actual cpanel usernames)
---------------- COPY FILES ----------------
source cPanel / Addon Domains
1) find the path where are website files for the addon domain you are transfering and copy this path to your notepad. Example: source is /public_html/yourdomain.com
2) open server command line (SSH shell) and execute following command (make sure paths match the path from step 1):
mv /home/SOURCECPANEL/public_html/yourdomain.com/ /home/SOURCECPANEL/public_html/yourdomain.com2/
In case you do not have above mentioned SSH shell access (regular cpanel users do not have), then you will need to copy files manually from cpanel to cPanel. Just login source cPanel, go to File manager / public_html and there go to the website directory (coppied in step 1) then click Select all and then click Archive/Compress to create .zip file. Then download ZIP to your PC. Then open and extract downloaded ZIP file that it contains your website files. Do not continue untill you have working backup. Fullbackup of entire account can be also created from source cPanel / Backups.
3-4) If you have WHM access (regular cpanel user do not have), go to "List Subdomains" section and find the addon domain that you are transfering and click "(Unpark)".
If you have NO WHM access (regular cpanel user do not have), then go to the source cPanel account, click Addon domains and delete/remove the addon domain you are transfering.
destination cPanel / Addon domains
5) fill and submit the form to create addon domain that you are transfering.
6) if have SSH shell access, execute following commands (make sure source paths match the one from step 1 and the destination paths match one used in step 5):
mv /home/SOURCECPANEL/public_html/yourdomain.com2/{.,}* /home/DESTINATIONCPANEL/public_html/yourdomain.com/
chown -R destinationcpanelusername:destinationcpanelusernam e /home/DESTINATIONCPANEL/public_html/yourdomain.com/
If not having SSH access, go to destination cPanel / File Manager / public_html and go to the folder of your transfered domain. In the folder click Upload icon to upload your ZIP which you created in step 2. Then click the uploaded ZIP and select to extract/unpack it. Click refresh button to see there are files and folders.
---------------- FILES COPPIED, MYSQLs NOW ----------------
destination cPanel / File Manager
8) access directory of the website you are transfering (/public_html/yourdomain.com/) and find the configuration file that contains MySQL credentials (if the script require MySQL database). Keep that file open for now
cpaneluser_databasename
cpaneluser_databaseuser
password
destination cPanel / MySQL Databases
9) create new database and username and then attach username to the database giving user all privileges (its all on same page (MySQL Databases)). Copy the credentials you just used t your notepad:
cpaneluser_databasename
cpaneluser_databaseuser
password
10) edit the MySQL configuration file mentioned in step 8 and replace old MySQL credentials by the new credentials you used in step 9 (database name, username, password). Save the file which will cause your website being unable to supply MySQL data as the new database is empty so far. In next step we will export/import data.
source cPanel / PHPMyAdmin
11) Select database of the website/domain you are transfering and click Export Tab, choose custom export, choose "Save output to a file" in output section. I select compression gzipped and "Go" to save the file to your computer
destination cPanel / PHPMyAdmin
12) import MySQL export file created in step 11 to your database (select database and click Import tab)
13) in web browser open your website you are transfering and see if there are any errors on it. If there is MySQL error, once again veriffy the mysql section of this tutorial that you did everything correctly. (Check mysql configuration file that all MySQL credentials in it are correct and correspnd to the credentials entioned in cPanel/MySQL databases and that user is assigned to this database and the password is correct. Then make sure in PHPMyAdmin database contains tables/data. (import went OK).
In case you see other error on the website, google that error and also try to contacct your hosting provider mentioning webpage where error appears.
---------------- MYSQL COPPIED, CRONs NOW ----------------
source cPanel / Cron Jobs
if there are any tasks, you will need to create them also in destination cPanel. You can skip Softaculous related tasks.
---------------- CRONs COPPIED, EMAILs NOW ----------------
source cPanel / Email Accounts
if there are any email accounts, you will need to create them also in destination cPanel. If you create new password/reset it, then do not forget to update your email client if you use it. If destination cPanel is on different server/with different hosting provider, then you may also need to update hostname/server in your email client.
Main things that need to be transfered: FILES, MySQLs, EMAIL accounts, CRONjobs
Do not use this tutorial if your addon domain have subdomains, they are not taken into account in this tutorial. Subdomains have to be created manually on destination cPanel and then its files copied and then its mysqls created, mysql data imported and PHP script configuration file modiffied to reflect new mysql credentials.
In the following tutorial, you will see example line:
source cPanel / Addon Domains
it means that you should login the cPanel account from which you are transfering the addon domain and then go to Addon Domains section in your cPanel.
---------------- PREPARE YOURSELF ----------------
You will need access to the source and destination cPanel. Open notepad and copy following three lines into it:
addon domain: yourdomain.com
source cpanel: SOURCECPANEL
destination cpanel: DESTINATIONCPANEL
(modify SOURCECPANEL, DESTINATIONCPANEL to reflect your actual cpanel usernames)
---------------- COPY FILES ----------------
source cPanel / Addon Domains
1) find the path where are website files for the addon domain you are transfering and copy this path to your notepad. Example: source is /public_html/yourdomain.com
2) open server command line (SSH shell) and execute following command (make sure paths match the path from step 1):
mv /home/SOURCECPANEL/public_html/yourdomain.com/ /home/SOURCECPANEL/public_html/yourdomain.com2/
In case you do not have above mentioned SSH shell access (regular cpanel users do not have), then you will need to copy files manually from cpanel to cPanel. Just login source cPanel, go to File manager / public_html and there go to the website directory (coppied in step 1) then click Select all and then click Archive/Compress to create .zip file. Then download ZIP to your PC. Then open and extract downloaded ZIP file that it contains your website files. Do not continue untill you have working backup. Fullbackup of entire account can be also created from source cPanel / Backups.
3-4) If you have WHM access (regular cpanel user do not have), go to "List Subdomains" section and find the addon domain that you are transfering and click "(Unpark)".
If you have NO WHM access (regular cpanel user do not have), then go to the source cPanel account, click Addon domains and delete/remove the addon domain you are transfering.
destination cPanel / Addon domains
5) fill and submit the form to create addon domain that you are transfering.
6) if have SSH shell access, execute following commands (make sure source paths match the one from step 1 and the destination paths match one used in step 5):
mv /home/SOURCECPANEL/public_html/yourdomain.com2/{.,}* /home/DESTINATIONCPANEL/public_html/yourdomain.com/
chown -R destinationcpanelusername:destinationcpanelusernam e /home/DESTINATIONCPANEL/public_html/yourdomain.com/
If not having SSH access, go to destination cPanel / File Manager / public_html and go to the folder of your transfered domain. In the folder click Upload icon to upload your ZIP which you created in step 2. Then click the uploaded ZIP and select to extract/unpack it. Click refresh button to see there are files and folders.
---------------- FILES COPPIED, MYSQLs NOW ----------------
destination cPanel / File Manager
8) access directory of the website you are transfering (/public_html/yourdomain.com/) and find the configuration file that contains MySQL credentials (if the script require MySQL database). Keep that file open for now
cpaneluser_databasename
cpaneluser_databaseuser
password
destination cPanel / MySQL Databases
9) create new database and username and then attach username to the database giving user all privileges (its all on same page (MySQL Databases)). Copy the credentials you just used t your notepad:
cpaneluser_databasename
cpaneluser_databaseuser
password
10) edit the MySQL configuration file mentioned in step 8 and replace old MySQL credentials by the new credentials you used in step 9 (database name, username, password). Save the file which will cause your website being unable to supply MySQL data as the new database is empty so far. In next step we will export/import data.
source cPanel / PHPMyAdmin
11) Select database of the website/domain you are transfering and click Export Tab, choose custom export, choose "Save output to a file" in output section. I select compression gzipped and "Go" to save the file to your computer
destination cPanel / PHPMyAdmin
12) import MySQL export file created in step 11 to your database (select database and click Import tab)
13) in web browser open your website you are transfering and see if there are any errors on it. If there is MySQL error, once again veriffy the mysql section of this tutorial that you did everything correctly. (Check mysql configuration file that all MySQL credentials in it are correct and correspnd to the credentials entioned in cPanel/MySQL databases and that user is assigned to this database and the password is correct. Then make sure in PHPMyAdmin database contains tables/data. (import went OK).
In case you see other error on the website, google that error and also try to contacct your hosting provider mentioning webpage where error appears.
---------------- MYSQL COPPIED, CRONs NOW ----------------
source cPanel / Cron Jobs
if there are any tasks, you will need to create them also in destination cPanel. You can skip Softaculous related tasks.
---------------- CRONs COPPIED, EMAILs NOW ----------------
source cPanel / Email Accounts
if there are any email accounts, you will need to create them also in destination cPanel. If you create new password/reset it, then do not forget to update your email client if you use it. If destination cPanel is on different server/with different hosting provider, then you may also need to update hostname/server in your email client.