There will be a time that you’ll need to create a duplicate of your WordPress website’s content and then use it under another domain. Perhaps you’re selling products that are known under multiple names, and you’d prefer to have distinct domains for each brand name.
Instead of constructing a completely new website for each domain, it is possible to utilize existing content on one of your existing domains. This article will guide you through duplicated WordPress website.
Note:Please be aware that the steps in this article are extremely sensitive. It is advised to create a complete copy of the website prior to completing the instructions in this article.
- Step 1: Copy Files to the Folder/Directory of the New Domain
- Step 2: Create a New MySQL Database
- Step 3: Edit the WordPress wp-config File for your New Site
- Step 4: Export the Database
- Step 5: Update the Database
- Step 6: Update the Database Tables
- Step 7: Update WordPress
Note : Legacy accounts will feature a horizontal navigation bar at the top of the screen, while Bluerock account users will see a vertical navigation menu on the left-hand side of the screen. If you are still unsure what interface your account uses, please see Bluerock vs. Legacy to determine which step to follow.
Step 1: Copy Files to the Folder/Directory of the New Domain
To add a domain to your existing one, you must log in to your Bluehost account control panel. Then complete the steps below to transfer files to the new domain.
- Bluerock Account Click on the Advanced tab on the menu on your side on the left. Under the File section, select on the file manager.
- Older account Click on the option cPanel option in the navigation submenu located at the top of your screen.
- Scroll down and hit on File Manager under the File section.
- Start by opening your public_html folder.
- At the upper part of your screen select to select All.
- Hold and press the Ctrl button while clicking (un-selecting) these folders within your public_html folder.
- addon domain folder
- If the files are still visible With the files highlighted, select the Copy button from the menu at the top of File Manager. A pop-up will show the following URL: /public_html
- In the box, type into the field the domain name for the domain folder in which you’re copying the files. This box should now look similar to /public_html/addondomainname.com. (Replace addondomainname.com by the domain name.)
- Click Copy File(s).
Step 2: Create a New MySQL Database
Once the files are transferred to your Addon Domain Folder, on a different screen, launch your MySQL Database Wizard within the cPanel. This is the place where you’ll have for you to create a brand new MySQL database.
Step 3. Edit the WordPress WP-config File to accommodate your brand-new website
To modify the wp-config.php file on WordPress, You must sign in initially to the Bluehost Control Panel.
- Bluerock Account: Click the Advanced tab located in the menu of the side navigation to the left, then click under the File section, then click the File Manager .
- Older Accounts: Click the cPanel option in the navigation menu on the right side of the screen.
- Scroll down, and then select File Manager under the File section.
- Go to your public_html folder, and then locate the domain addon folder.
- Simply right-click on the wp-config.php file and click the Code Editor edit button.
- Once this page is open, Edit the information to reflect the data assigned to the database that was created in the earlier step.
- Click the Save Changes button.
Your wp-config.php file is now displaying the database’s correct names, users, and passwords for the database. This is crucial for WordPress to determine which database to get the details from.
Step 4: Export the Database
Transfer the data from your primary domain, and transfer it to the new database. For assistance with this procedure, refer to these articles
- How do I import or export a Database using PHPMyAdmin
Step 5: Update the Database
The settings in the database must be changed to reflect the latest information about the domain name.
- Log into the Bluehost account control panel.
- Bluerock Accounts: click on the Advanced tab on the menu of side navigation towards the left. Find in the Database tab and select the icon for phpMyAdmin. icon.
- Older Accounts: click the cPaneloption from the navigation menu on the right side of your display. Then, search for Tools for Databases section.