Your Ad can be there
+ Post New Thread
Results 1 to 2 of 2

Thread: What to do to move an addon domain from one cPanel to another cPanel?

  1. #1
    Fli
    Fli is offline
    Administrator Fli's Avatar
    Join Date
    Mar 2013
    Posts
    2,603

    What to do to move an addon domain from one cPanel to another cPanel?

    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.

  2. #2
    Junior Member imort's Avatar
    Join Date
    Apr 2016
    Posts
    15


    Is this useful / helpfull? Yes | No
    Quote Originally Posted by admin View Post
    What to do to move an addon domain from one cPanel to another cPanel?

    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/
    .
    I have to add: if you need to move your domain to another cPanel which is installed at another server you can use the 'scp' command instead of creating a zip archive and uploading it manually.
    All you need is access to the SSH console and you can copy all your files to the new server.
    You'll need SSH account there too of course.

    You can look for the examples at this article.

+ Post New Thread

Similar Threads

  1. Backdoor in Cpanel for addon domain names
    By webc in forum Shared Hosting
    Replies: 2
    Last Post: 02-07-2018, 12:20 PM
  2. Replies: 0
    Last Post: 07-30-2017, 01:43 PM
  3. Replies: 0
    Last Post: 06-11-2015, 08:14 PM
  4. Replies: 0
    Last Post: 01-12-2015, 04:22 PM
  5. cPanel addon domain password purpose
    By Fli in forum Control Panels
    Replies: 0
    Last Post: 03-21-2014, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam