This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

Manually Changing the Domain of Your WordPress Site

There may come a time when you need to duplicate the content of your WordPress site and use it on a different domain name. Perhaps you are promoting a product that is known by more than one name, and you would like to have separate domains for each product name.

Instead of designing a new site for each and every domain, you may choose to use the content that already exists on one of your current domains. The following article will guide you through duplicating a WordPress site.

Note: Please be aware that following the steps below may not be enough to successfully change your domain due to the way WordPress communicates with the server. It is recommended that you make a full backup of your website using the Backups button in cPanel before proceeding with the remaining steps in this article.

Step 1: Copy Files to the New Domain

To add a new domain, go to cPanel > Addon Domains; then complete the following steps to copy files to your new domain.

  1. From the cPanel homepage, open File Manager.
  2. Open the public_html folder.
  3. Along the top of the screen, click Select all.
  4. Press and hold the Ctrl key while clicking (un-selecting) the following folders in your public_html folder:
  • .qidb
  • cgi-bin
  • addon domain folder
  • With the files still highlighted, click Copy in the top menu of the File Manager. A pop-up will open showing the following path: /public_html
  • Type the name of the addon domain folder to which you are copying the files. This box should now look similar to: /public_html/addondomainname.com
    (Replace addondomainname.com with the actual domain.)
  • Click Copy File(s).

    Step 2: Create a New MySQL Database

    Once the files have been copied over to your addon domain folder, in another screen, open the MySQL Database Wizard in cPanel. This is where you will need to create a new MySQL database.

    Step 3: Edit the WordPress .config File for your New Site

    To edit the wp-config.php file for WordPress:

    1. In cPanel, go to File Manager.
    2. Open the public_html folder and locate your addon domain folder.
    3. Right-click on the wp-config.php file and click Code Edit.
    4. When this page opens, edit the following information to reflect the values that were assigned to the new database that was created in the previous step.
    • DB_NAME
    • DB_USER
    • DB_PASSWORD
  • Click Save Changes.
  • Your wp-config.php file should now reflect the correct database name, database user and database password. This is essential for WordPress to know which database to obtain the information from.

    Step 4: Export the Database

    Export the database from the primary domain and import it into the newly created database. For help with this process, please refer to the following articles:

    Step 5: Update the Database

    The database settings must be updated to reflect the new domain name information.

    1. Go into cPanel, and click on the phpMyAdmin icon.
    2. In the left navigation panel, click on the newly created database name.
    3. In the left navigation panel, click wp_options.
    4. Click Edit on the siteurl line.
    5. Change the primary domain name to the addon domain name.
    6. Click Go.
    7. Click Edit on the blogname line.
    8. Change the blog name to reflect your new blog, and click Go.
    9. Click Edit on the blogdescription line.
    10. Change the blog description to reflect your new blog, and click Go.
    11. In the left navigation panel, click wp_users.
    12. Click Edit on theuser_login line and change the user name to reflect a new login username of your choice.
    13. On the user_nicename line, change it there as well. For security purposes, do not use Admin as either username.
    14. On the user_pass line, highlight and delete the characters already in that box.
    15. Create a new password of your choice.
    16. To the left of that is the varchar(64) box; click the down arrow and select MD5.
    17. Click Go.

    You can test these changes by visiting http://yourblogname.com/wp-login.php (replace yourblogname.com with your actual domain name).

    You should now be able to log in to your newly imported WordPress site.

    Step 6: Update the Database Tables

    Once the domain is working and you can log in to the WordPress Dashboard of the new site, install the Search and Replace plugin. It will allow you to search all of the tables in the database, search for your old domain and replace each instance with your new domain. You can uninstall the plugin after the tables have been updated. In addition to to the database, you should check your site for any links hard-coded into widgets, etc. Those links will need to be manually edited to reference your new site address. For additional information on using this plugin, please review the following article:

    Step 7: Update WordPress

    1. Log in to your WordPress Dashboard.
    2. In the left navigation menu, go to Settings.
    3. Click General.
    Be sure that each of the following fields displays your new domain name and not the old one:
    Was this resource helpful?

    Did this resolve your issue?


    Please add any other comments or suggestions about this content:





    Recommended Help Content

    This article will explain how to change the Site URL or Home URL setting in WordPress. This may be useful if you have moved your WordPress site or are planning to move your WordPress site.
    Knowledgebase Article 170,111 views tags: home site url wordpress wordpresstools

    This article will explain how to login to a website created with WordPress.
    Knowledgebase Article 407,583 views tags: access admin change dashboard edit login site wordpress

    This article will explain why you see "Your WordPress site appears to be infected with malware. Please update to remedy this problem."
    Knowledgebase Article 127,014 views tags: malware wordpress wordpresstools

    Related Help Content

    This article will explain how to login to a WordPress site using WordPress tools.
    Knowledgebase Article 112,979 views tags: login wordpress wordpresstools

    What you need to know about the WordPress 5.0 update
    Knowledgebase Article 27,072 views tags: classic editor gutenberg release rollout tinymce update wordpress

    How to update your WordPress site, using the WordPress tools
    Knowledgebase Article 55,093 views tags: upgrade wordpresstools

    How to manually migrate a WordPress site, not using ManageWP.
    Knowledgebase Article 338,656 views tags: export import migrate wordpress

    How can I change the primary domain name on my account?
    Knowledgebase Article 1,211,005 views tags: account change domain primary rename

    Using WordPress with the Temporary URL
    Knowledgebase Article 623,961 views tags: blog domain ip press resolve resolving staging temp temporary url word wordpress wrong

    There are multiple different ways you can install a theme you have purchased for your WordPress site. This article will explain our two recommended methods for installation.
    Knowledgebase Article 18,498 views tags: auto automatic certified download install manual premium themes update upload wordpress

    Our updated 'Rock' user interface offers a fresh new look, along with several useful tools and helpful features. One such feature is the My Sites tab, where you can easily manage your websites.

    ** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

    ¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.