Do you want to clone a WordPress website?
Cloning an existing WordPress site is a crucial first step when moving to a new host, doing a client development project on a localhost, setting up a staging website, and more.
In this article, we’ll show you how to easily clone a WordPress site in easy steps.
What is WordPress Website Cloning, and Why Use It?
The idea behind cloning a WordPress website is that you make an exact copy of one site and apply it to another site.
There are some good reasons where doing this makes a lot of sense.
Another good reason is when you’re developing a website for a client on your own localhost. Once the project is done, you can easily clone the site and move it to your client’s live server.
You can also clone a live WordPress site and set up a staging site to test changes before making them live.
With that said, let’s show you how you can clone a WordPress site in easy steps.
Step 1. Setup the Duplicator WordPress Plugin for Easy Cloning
The plugin backs up everything from your website into a single file, which you can easily move to a new location.
First thing you need to do is activate and install the plugin on the domain you want to clone. For more details, see our step by step guide on how to install a WordPress plugin.
Note: There’s a pro version of Duplicator available that packs additional features like scheduled backups, multisite migration, and more, but we’ll use the free version for this tutorial since it can fully clone a WordPress site.
Step 2. Create a Duplicator Package of Your WordPress Site
Upon activation, you need to go to Duplicator » Packages and then click on the ‘Create New’ button at the top of the page.
After that, you’ll be taken to a screen where you need to give your duplicate a name.
Then, click the ‘Next’ button.
Duplicator will now start its duplication wizard. It will run some tests to make sure everything is in order to run the plugin.
If it finds an issue with any part of your site, then you’ll see a warning with steps you can take to fix it.
If everything is good, then click the ‘Build’ button beneath the scan to continue.
The plugin will now backup your WordPress database, images, templates, plugins, and all other files in a single downloadable package.
Depending on your website’s size, the process might take a couple of minutes.
Step 3. Prepare to Clone Your WordPress Site
Once the backup process is finished, it’s time to download your files.
You need to download two different files, the archive file containing your backup and the installer that will unpack the archive.
You need to click on the ‘One-click Download’ link to download both files to your computer.
Both of these files are extremely important to properly clone your WordPress site in the new location.
Step 4. Upload Your WordPress Site Archive and Installer to a New Location
Now that you have a complete backup of your site and the installer file, the next step is to upload them to the new location.
This new location can be a live website or a site on your local server. If it is a site on your local server, then you need to create a new folder in your local server’s root folder. This is the file where your local server stores all websites.
For example, if you’re using MAMP, then it will be ‘/Applications/MAMP/htdocs/’ folder.
Alternatively, if you’re using WAMP, then it would be ‘C:\wamp\www\’ folder.
Next, open up the folder you created for your cloned website and copy both the archive file and installer into the folder.
If it is a live website on a different WordPress hosting platform, then you need to upload these files to the root directory using an FTP client.
If you haven’t done this before, then see our beginner’s guide on how to use FTP to upload files to WordPress.
No matter where you upload the files, you need to ensure the folder is completely empty and only has the installer.php and your archive zip files.
Step 5. Create a New WordPress Database for Your Website
Next, you need to create a new WordPress database to unpack your cloned version of WordPress.
If you’ve already created a database, then you can skip this step.
There are a few ways you can create a database, depending on if the new location will be a live site or a site on your local server.
If you’re using a live site, simply login to your hosting account dashboard, then scroll down to the ‘Databases’ section and click the ‘MySQL Databases’ icon.
This brings you to a screen where you need to enter a name for your database.
Then, click the ‘Create Database’ button.
Next, you need to add a new user to the MySQL database. Simply scroll down to the ‘MySQL Users’ section.
Then, add a username and password for your new user and click the ‘Create a user’ button.
Once you’ve done that, you need to add this user to your database.
Simply scroll down to the ‘Add User to a Database’ section, select the database user you created in the ‘User’ dropdown, then select the database you created from the ‘Database’ drop down.
After that, click the ‘Add’ button. Make sure you take note of the database name, username, and password. You’ll need this information in the next step.
If you’re using a localhost installation, simply visit ‘http://localhost/phpmyadmin/ ‘ or ‘http://localhost:8080/phpmyadmin/’ in your web browser to launch phpMyAdmin.
After that, click on the ‘Menu’ tab, then select the ‘Database’ option.
Next, you need to enter a new name for your database.
Then, click the ‘Create’ button.
You need to remember the name of your database for the next step. For most localhost installations, your host will be localhost, and the username will be root, with a blank password.
Step 6. Run the WordPress Website Importer Script
Now that all your files are in place, you need to run the Duplicator installer script. This script unpacks your archive file in a few clicks.
First, type your website URL into the web browser and add installer.php to the end of it. This will look something like, ‘https://example.com/installer.php’.
Make sure you replace ‘example.com’ with your own domain name, or the localhost address of your new site.
Next, the Duplicator installer script will appear on the screen. First, it will automatically look for existing backup files and the initial settings.
If there are no errors, then check the terms and notices checkbox at the bottom and click ‘Next’ to continue.
On the next screen, you need to enter your WordPress database information.
This is the database information that you copied above.
At the bottom of the page, there’s a ‘Test Database’ button you can use to make sure all of your database information is correct.
If everything looks good, then you can click the ‘Next’ button.
Duplicator will now import your WordPress database. It will automatically detect any changes and will fill in the ‘URL’, ‘Path’, and ‘Title’ fields for you. Simply click the ‘Next’ button to continue.
Duplicator will now finish the installation, and you will see the admin login button.
Clicking on it will take you to the new cloned site’s WordPress admin area.
Step 7. Test Your Cloned Website and Delete Temporary Files
You can now go ahead and test your cloned WordPress blog.
We recommend testing both the WordPress admin area and the front end of your website to make sure all your data is there and the website is working as intended.
Once you’re satisfied that everything is imported correctly, you can go ahead and delete the installation files created by the Duplicator plugin.
On your cloned WordPress site, go to Duplicator » Tools and then click on the ‘Remove Installation Files’ button.
That’s it, you have successfully cloned a WordPress site.
Closing Thoughts on WordPress Website Cloning
As you can see, cloning a WordPress site is not very difficult as long as you’re duplicating your own website.
If you want to copy someone else’s WordPress site, then that’s actually illegal unless you have their explicit written permission.
There are other ways to clone a WordPress site, like doing it manually, which doesn’t require WordPress admin access. But we believe there are no benefits to that unless you’re dealing with a really big website.
For most times where you’re cloning a WordPress site, we recommend using the above method because it’s the easiest and most comprehensive.
We hope this article helped you learn how to easily clone your WordPress site. You may also want to see our guide to the difference between a domain name and web hosting and our expert picks of the best email marketing services for small businesses.