New From WPMU DEV: Cloner, the Site Cloning Plugin for WordPress Multisite

Sometimes you just need to make an exact copy of a site in your WordPress multisite network and you want to do it as quickly and as painlessly as possible. Other times you just want to copy all the users or posts.

Cloner, the latest WordPress multisite plugin from WPMU DEV allows you to effortlessly clone all or part of a site in your network. No fuss, no bother just a couple of clicks and it’s done.

Perfect for worry-free troubleshooting, staging, adding users to a new or existing site and distributing content across multiple sites, Cloner is destined to quickly become an essential tool for every WordPress multisite network owner.

Promotional image for Cloner plugin
Cloner, the perfect solution for troubleshooting, staging, copying users and creating model sites

Cloner is the latest addition to the WPMU DEV suite of site copying tools that includes Snapshot, New Blog Templates and Multisite Content Copier.

Each has its own particular focus and Cloner is the result of requests from users of CampusPress, WPMU DEV’s WordPress-powered education blogging tool.

It allows a network’s Super Admin to clone components (there are 9 to choose from) from one site to either an existing site or to a new site simply by entering the site’s slug and clicking on Clone Site.

Why Is That Useful?

There are a number of scenarios why being able to clone a component of, or an entire, site would be hugely beneficial to a WordPress multisite network owner:

Troubleshooting – we’ve all had the experience of an issue being reported on a site that requires the kind of debugging that just isn’t possible on a live site. Cloner allows the Super Admin to quickly and easily replicate the site to a private area for some in-depth prodding and poking out-of-sight from the site’s owners.

Creating new sites just like that one – another common request is to have a new site that looks and works just like an existing site. Cloner allows the Super Admin to do this in a couple of clicks. Of course, if the request is common enough then a “model” site can be created that can be copied as required.

Cloning a site’s users – there are often times when you might want to provide the users of one site with access to another. Using Cloner, the Super Admin can specify that only users are to be cloned meaning that everything else on the destination site remains in tact.

Staging – related to troubleshooting, Cloner is perfect for cloning an a test site to a public location (and leaving the test site fully operational) or for creating a test version of a live site to be worked on before cloning back to the live site.

No doubt that has piqued your interest, so let’s look at how the Cloner plugin does its job.

How Does It Work?

Let’s walk through a simple example to show you how it works.

You need to start with a multisite network, of course. I’ve set one up using sub-directories and I’ve installed and network activated the Cloner plugin.

Step 1 : Configure The Plugin’s Settings

The first thing to do, is configure the plugin’s settings which are under Settings > Cloner in the Network Admin interface:

Screengrab of the Cloner plugin's settings page
Cloner allows good control over which components get copied

As you can see, there are 9 possible components that can be selected including custom tables which you’ll definitely welcome if you have any plugins installed that create their own data store. Posts will include everything in the Post table that has a status of publish, including custom post types.

I’m going to leave all the options checked as I want to clone an entire site.

Next step is to select the site to clone.

Step 2 : Select Site To Clone

Selecting the source site couldn’t be easier. Go to Sites in the Network Admin interface and when you hover over a site, you’ll see Clone in the list of actions.

Screengrab of the Sites list showing the Clone action item
Selecting the site to be cloned is as easy as hover and click

Click on Clone and now we’re ready to specify the destination site.

Step 3 : Specifying the Destination

Cloner can either create a brand new site, or overwrite an existing site. In the case of an overwrite, only those components you specified in the plugin’s settings will be overwritten, allowing you to clone a list of users, for example.

Let’s create a new site by ensuring that the Create New Site radio button is selected and that a new site name is entered in the textbox.

Screengrab of the desntiantion selection page - create a site or overwrite an existing site
Clone to a brand new site or overwrite an existing site – choice is yours

If you select Replace Existing Site then you will be asked to confirm that you really want to do this.

Click on Clone Site and the plugin will start copying your site to a new or existing site. How long it takes will depend on how much content the original site contains, particularly the number of attachments.

Screengrab of the updating Cloner log
Cloner tells you how the process is progressing

When the process is complete you are automatically redirected to the Admin interface of the new site.

If the operation was a full clone then it’s probably a good idea to jump into Settings > General and change at least the site title so that you can more easily identify your clone.

As you can see, with Cloner, making replicas of your network sites is incredibly easy and you are probably already thinking about uses for this tool that I haven’t even mentioned.

If you are a WPMU DEV member then you can download and try Cloner now.

Comments (19)

  1. Just wondering a couple or things:

    1) Will it will clone the “/” root site into a subsite?.
    2) Will it clone a subsite into the network root?
    3) How is it different from “New Blog Templates”?

    Thanks,

    HG/MS

    • Cloner doesn’t allow for the root site to be either the source or the destination of a cloning operation.

      The plugin is more about ad hoc copying whilst NBT is about bringing some control to multisite’s built-in site creation functionality by allowing new sites to be created from a pre-determined template. Of course, NBT offers the capability of having multiple templates for site creators to choose from.

      It’s a good question and I’m going to be posting about the difference between Cloner and NBT (and Snapshot and Multisite Content Copier) today (Tuesday).

    • I’ve been checking the code of that plugin. The difference between Blog Copier and Cloner is big. Cloner uses nativ WP functions, Blog Copier doens’t. That means that Cloner respect WordPress and triggers almost all native hooks in the background.

      It also allows to refresh cache if you have one cache system installed in your system.

      Blog Copier copies all tables with queries. That’s fine if your site is a basic one but for more advanced stuff you’d need to use native WP functions instead,

      • Indeed, native functions must be respected when we use a framework… In this point I agree with you but this must be more like a free plugin for what it does ! This is my 2 cents.
        When we have “WP migrate [PRO]” or “all in one migration” (well there are some bugs with complex serialized objects”) I really don’t see the point to pay for a plugin that does basic tasks.

        • @3pepe3 I think you;re missing the point a bit…

          - There are few super admins comfortable with phpmyadmin and SHS… the last thing I’d call a ‘basic task’ is messing with your network using those tools!

          - This doesn’t just replicate that, it adds in a heap of options and capacities

          - And perhaps most significantly, this is a WPMU DEV plugin, so it’s guaranteed to work, be updated, be secure and have been tested at length (and developed in partnership with Edublogs, so good for load too) … and you are welcome to make additional feature requests :)

  2. Does this support the cloning of widgets between sites? We’ve got a site that makes heavy use of sidebars that we’re very keen to get set up in a staging environment and this could be just the trick.

    • It depends.

      It should copy the widgets settings but if the widget options are very complex it could not been displayed the same. For instance, a widget that has a reference to a post ID. That post ID will change in the cloned blog so you’d need some custom coding to extend Cloner. The plugin has plenty of hooks so is very extensible.

  3. Two questions:

    1. Does this copy individual plugin settings as well? I’m assuming you have to manually copy themes and plugins to make them available.

    2. Can you clone to entirely separate domain? I often create sites on my own dev multisite, then launch on a client’s domain (like so many others do as well). I’m still looking for that plugin that will allow me to clone a dev site over to that new site.

    • Mainly, your server is your limit. Cloner clone things in chunks but a very large list of posts or pages or Custom Post Types could bring a timeout. It depends on the power of your server.

Participate