So, How to Duplicate a Site in a WordPress Multisite Network?

The whole site duplication process is as simple as clicking the “Duplicate” link for a target site on the Sites > All Sites page in the network dashboard.

However, let’s take a look at the plugin configuration.

1. Install and network activate the plugin

Since this is a plugin for WordPress Multisite installations, we need to activate it for the entire network, not just for some specific sites. In order to do so, in your network dashboard, go to the Plugins page and click the “Network Activate” link.

Network activate plugin for all sites in WordPress Multisite.

2. Configure the plugin

First things first, let’s go to the main plugin settings page in Settings > Duplicate Site. Here is how it is going to look:

Duplicate Site for WordPress Multisite plugin settings

Let’s take a detailed look at some settings specifically:

  • Excluded Post Types and Excluded Post Statuses – the plugin allows you to prevent duplicating some specific post types and post statuses. For example, let’s assume that you don’t need drafts and deleted posts to be duplicated to a cloned site; in that case, you need to add draft and trash into the “Excluded Post Statuses” field.
  • Users – I added this option because it is not always needed to add all the users from an initial site to a duplicated site.
  • Files – In case you need only a site database to be duplicated, just uncheck this checkbox.

These are kind of the global plugin settings, but there is also more configuration available for each site; we’re going to talk about it in a bit.

3. Configure a site you’d like to clone

The “Duplicate Site for WordPress Multisite” plugin also comes with some site-specific settings; for example, you can completely turn off a specific sub-site; after that, the “Duplicate” link won’t be available for it.

And also, for each site, you can choose what database tables should be duplicated. Which could be super convenient.

In order to get a clearer picture of how it works, take a look at the screenshot below:

Settings of a target sub-site which is going to be cloned

4. Duplicate a site from “Sites > All Sites”

Once we’re done with the configuration (which was optional, by the way), in the network dashboard, we can go to the Site > All Sites page, and duplicate any site we want.

WordPress Multisite clone site example
You can clone any sub-site of your WordPress Multisite network in one click.

5. Changing the name and URL after duplicating a site

The plugin doesn’t have a separate settings page in the network admin dashboard, which appears in other plugins when you’re trying to clone a specific site of a multisite network. Usually, that’s the place where you can choose a new site copy’s name and URL.

In the case of my plugin, the idea was to make the whole duplication process as simple as clicking a “Duplicate” link.

It means that a new site copy will be created with a site name with the Copy suffix at the end (for example, “Site Name Copy”, “Site Name Copy 2”, etc.). The same rule applies to the URL of a cloned site.

It works this way because both the site name and URL can be easily changed later. All you need to do is click the “Edit” link and then go to the “Settings” tab.

Change a duplicated site name and URL
Here, you can type a new site name (blogname) and URL (siteurl and homeurl) and after that, click the “Save Changes” button.

Clone a Site with WP-CLI Commands

Last but not least, in your WordPress Multisite, you can also duplicate a site with a WP-CLI command provided by the plugin.

$ wp ds clone 5
ArgumentDescription
<site-ID>The initial site ID to duplicate.

By default, the WP-CLI command applies all the global and site-specific settings.