- First, go to the WordPress Toolkit interface in WHM or cPanel
- Open WordPress Toolkit and expand the detailed view of the site you want to clone.
- After clicking Clone, a window will appear asking if you want to clone WordPress to a new subdomain or an existing domain.
- Click the Clone tool on the site dashboard.
- WordPress Toolkit creates the subdomain and location to clone the website if they don’t exist
- Select a subdomain and location to clone the site
- After setting up the subdomain, click Start at the bottom of the page and the cloning process will begin. When the cloning is complete, you will receive a notification that your website has been cloned. When you’re done, log in to the cloned site.
- First, create a new database.
- Open MySQL Databases, which you’ll find under Databases the main page menu.
- Enter a name for the new database under Create New Database and click the Create Database button.
- Next, we export the original database. We’ll use phpMyAdmin, which is also under Databases in the cPanel menu.
- Select the original database in the sidebar.
- Select the Export tab and make sure the Quick export method is selected.
- The custom method lets you change database export options, but we’ll stick with the defaults.
- Click Go. This “dumps” the database, downloading an SQL file to your local machine with the information needed to recreate the original site’s database. That’s what we’re going to do next, also using phpMyAdmin.
- Log into cPanel,
- Navigate to the MySQL databases page.
- Enter a username and a password under Add New User section.
- Click Create User, then return to the MySQL Databases page.
- Select the new user and the database we created in the previous section.
- Click Add
- Select “All Privileges” on the next page and confirm the changes. The files and database have now been copied, but our cloned WordPress site is still configured to use the original site’s database. We will now configure the clone to use its own database.
- Open the file manager and select the new site directory.
- Select the wp-config.php file.
- Click Edit on the toolbar.
- WordPress has to connect and authenticate with the new database, as such several fields in the MySQL settings section of wp-config.php need to be modified
- Enter the new database name in the DB_NAME field.
- Enter the user we just created in the DB_USER field.
- Enter the user’s password in DB_PASSWORD.
- While wpconfig.php is open, we can also notify WordPress of its new URL. By adding the following lines, with the appropriate changes, to the bottom of the file.
define( ‘WP_HOME’, ‘http://example.com/testingwordpress’ );
define( ‘WP_SITEURL’, ‘http://example.com/testing wordpress’ );
- Save Changes when you’re finished. You should now be able to load your cloned site at http://your_domain.com/your_subdirectory which will be something like http://example.com/testingwordpress.
- Login to your cPanel account.
- Locate and click ‘Softaculous Apps Installer’.
- Click the application in which you want to clone and Click on ‘Clone’.
- Enter the Clone installation details.
- Click on All Installations, this will take you to the Clone Installation page. You can fill the required details of where you want your clone to go. Choose Protocol: Stick with the default https:// Choose Domain and leave the In Directory blank(if you are moving to a subfolder, enter that here). Database Name: Leave it as default or enter a database name Once the required information for your clone has been filled in, click on the Clone Installation Softaculous will install the clone to the new folder(domain/subdomain) you selected. It also clones the database as well so that each copy has its own. (Be sure that you have enough room on your hosting plan for the databases or your clone will fail).