As a business, it is possible to market a well-known product with multiple names or brands, and you’d prefer to have distinct domains for each item. This is the reason you might be required to duplicate your WordPress website’s content and host it under an additional part.
Instead of creating a separate website in each domain, you can make use of the content that is already within your fields. This guide will assist you with duplicates of a WordPress website.
Be aware that these steps may not be sufficient to completely change your domain due to the way WordPress is a server-side application. Before you begin, it is suggested that you create a complete copy of your site by using this backup feature in the cPanel.
Important Note:
HostGator does not accept requests for cloning of sites at the present moment, and the instructions below are only suggested if you’re fully educated about how to manage WordPress files. It is strongly recommended to reach out to your web designer and request them to create this for you instead. This guide could break your website if not executed correctly, and HostGator is unable to reverse the process.
Step 1: Copy Files/Content to the New Domain
Click Here to add the new domain to the cPanel’s Addon Domains section, then follow the steps below to transfer files to the new environment.
- Log in to cPanel.
- Look for the Files section and click File Manager.
- Start your web page public_html(or the document root of the domain from which the source files originate from).
- Click Choose All, located at the top of the screen.
- Press the Ctrl-Click the key to select (un-selecting) the folders or files in the public_html folder of your computer:
-
- CGI-bin
- .qidb
- addon domain directory
- After the files have been highlighted After the files are highlighted, click Copy on the top menu of the in the top menu of the Manager. A pop-up will be displayed in the top menu of the File Manager, showing the path to the file:
- /public_html
- In the box, type into the field the domain name for the domain directory where you’re copying the files. The package will now appear like this:
- /public_html/youraddondomain.com
- Change youraddondomain.com with your actual domain name.
- Click Copy File(s).
If you’re unfamiliar with this feature, you can read about it here. File Manager and want to know more about using it, you can read the following article:
- Navigating the File Manager
Step 2: Create A New MySQL Database
Once the files are transferred to your addon domain directory, you can open your MySQL(r) databases in the cPanel and create a brand new MySQL Database.
Step 3: Modify the wp-config.php File for Your New WordPress Site
To modify the wp-config.php to work with WordPress:
- Log into the cPanel’s File Manager in your cPanel.
- You can go to public_html to discover public_html to locate the wp-config.php file. (If you are using different domains, you can access the site’s root document. ).
- Right-click on the wp-config.php and click Edit From the menu. You can also choose the icon in the menu. wp-config.php the file, and then click the file and then click on the Edit icon that is located near the top.
- A dialog box could pop up asking about encryption. Click Edit Continue. To continue, the editor opens a brand new window.
-
- A new page will be opened for you to edit the information to reflect the new values associated with the new database that was created in Step 2.DB_NAME
- DB_USER
- DB_PASSWORD
- Click Save Changes.
Your wp-config.php file is now displaying your correct name of the database, user name, and database password. This is crucial for WordPress to determine which database to get the details from.
Step 4: Export the Database
The primary domain can export the databases and transfer them to the new database. For assistance with this procedure, please read these articles.
- Export a MySQL Database via phpMyAdmin
- How to Import Your MySQL Database
Step 5: Update the Database
The database settings need to be changed to reflect the updated details about the domain’s name.
- Look for the Databases section, then click on the PHPMyAdmin.
- On the next screen On the next page, select the newly created database’s name.
- Click wp_options.
- Click Edit on the Site URL and Home URL line.
- Change the option_value. Add your new domain name, or you can make use of it to register a Temporary URL If your addon’s domain isn’t pointing to HostGator at this time.
- Go to Save the Changes. “Go” for saving the modifications.
- Select to edit on the blog’s name line.
- Change the name of your blog to reflect the new blog name.
- Click Go.
- Make sure to click to edit on the blog’s description line.
- Modify the description of your blog to reflect the new blog.
- Click Go.
- In the navigation panel to the left, Click wp_users.
- Click Edit on the user_login Line, and alter the username in order to show a different user name of your choice.
- On the Line for user_nicename, make sure to change the username there, too. For security reasons, Do not use Admin as a username.
- On the Line for user_pass, Highlight and erase the characters that are already in the box.
- Select the downward arrow. choose MD5. Create the password you want to use.
- Click Go.
Leave a Reply