How to Clone a WordPress Site for Development and Testing

Updated on Nov 23, 2022

When making significant changes to your WordPress site, it is best to do so on a clone (duplicate) version of it. There are numerous ways to accomplish this. When you need to test new things, we'll show you how to manually create a copy of your WordPress site. In this article, we will demonstrate how to clone a WordPress site in 7 simple steps.

This method will create two separate multisite installations if you use the multisite option. When you duplicate a multisite installation, the duplicated structures and data are stored in the database and WordPress files for the respective multisite installation. This can be perplexing. If you are unfamiliar with the differences between multisite and single-site WordPress installations, please only use these instructions to duplicate a single-site WordPress installation.

This post includes:

What is Cloning, and Why Use It?

The concept of cloning a WordPress site is straightforward: you create an exact copy or duplicate of one WordPress site and apply it to another.

You may be wondering if there are any good reasons to do this. Absolutely!

Moving a WordPress site to a new web host or domain name is one example of a practical scenario. Cloning a website will save you countless hours of work.

Another possible application is when working on a site for a client on your local server. When the project is completed, duplicate the WordPress site and migrate it to your client's live server.

Finally, for testing and development, you can clone a live WordPress site to your local server.

Cloning a WordPress site is a simple process. If you can point and click, you can duplicate a site in minutes.

Here's a 7-step guide to cloning a WordPress site, even if you're a beginner!

How to Clone a WordPress using Duplicator Plugin

The Duplicator plugin will be used in this article. It is a powerful WordPress backup and migration plugin designed for both beginners and experts.

The first step is to install and activate the Duplicator plugin. For more information, see our step-by-step guide to installing a WordPress plugin.

The plugin is ready to use right away and does not require any configuration.

How to Create a WordPress Backup Using Duplicator

Duplicator clones your WordPress site by first creating a backup and then unpacking it in a new location.

Let's start by making a WordPress backup package.

  • To begin, go to the Duplicator Packages page and click the 'Create New' button at the top.
  • This will launch the Duplicator wizard, where you must click the next button to proceed.
  • Duplicator will now scan your website to check if everything is in order to run the plugin. If the plugin finds an issue, then you will see a warning here.
  • If everything is marked good, then you can go ahead and click on the ‘Build’ button to continue. Duplicator will now back up your WordPress database, images, templates, plugins, and all other files in a single downloadable package.

How to Prepare to Clone Your WordPress Site

When Duplicator has completed the backup process, a link to download the archive containing backup files and an installer script will appear.

To download both files to your computer, click the 'One-click Download' link.

Both of these files are critical for properly cloning your WordPress site to the new location.

How to Upload Archive and Installer to the New Location

Now that you have a complete backup of your site as well as the Duplicator installer file, upload them to the new location.

This new location could be a live website or a local server. If it is a local server site, simply copy and paste the files into a subfolder within your htdocs or www folder, as shown below:

C:\wamp\www\mynewsite\

If it is a live site on a different WordPress host, you must use an FTP client to upload these files to the root directory.

No matter where you copy the files, make sure the folder is completely empty and contains no other files or folders besides the installer.php file and your backup zip file.

How to Utilize The Duplicator Script

Now that all your files are in place, you need to run the Duplicator installer script.

Simply visit the new website in a web browser and add installer.php at the end of the URL.

https://example.com/installer.php

Don’t forget to replace example.com with your own domain name or the localhost address of your new site.

The Duplicator installer script will now appear on the screen. It will look for backup files and basic configuration settings on its own. If everything appears to be in order, check the terms and notices checkbox. After that, you can proceed by clicking the Next button.

Duplicator will prompt you to enter database information on the following screen. This is the database for your newly cloned WordPress site.

Don’t forget to click on the ‘Test Database’ button to make sure that the database information you entered is correct.

After that, click on the Next button to continue.

Duplicator will now import your database and files. Next, it will ask you to update the settings for the new site.

It will automatically detect the changes and fill in the URL, Path, and Title fields for you. You can just click on 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.

Test Your Cloned Site

You can now put your cloned WordPress site to the test. We recommend testing both the admin area and the front end of your website to ensure that all of your data is present and that the website is functioning properly.

If you run into any problems, read our guide on how to fix common WordPress errors.

Delete Temporary Files

Once you are 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 page and then click on the ‘Remove Installation Files’ button.

That’s it, you have successfully cloned a WordPress site.

Final Thoughts

As you can see, cloning a WordPress site is simple as long as you duplicate your own. If you want to copy someone else's WordPress site, you are breaking the law unless you have their express written permission.

There are other ways to clone a WordPress site, such as doing it manually, which does not even require WordPress admin access, but we believe there are no benefits to doing so unless you have a very large website.

We recommend using the above method for the majority of use-cases where you need to duplicate a WordPress site because it is the simplest and most comprehensive.

We hope this article was useful in cloning your WordPress site. You may also be interested in our comprehensive step-by-step guide to increasing WordPress speed and performance.

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

WordPress Hosting

  • Free WordPress Installation
  • 24/7 WordPress Support
  • Free Domain Transfer
  • Hack-free Protection
  • Fast SSD Storage
  • Free WordPress Transfer
  • Free CloudFlare CDN
  • Immediate Activation
View More