Bug #8414

Site duplicator/clone plugin

Added by Boone Gorges over 4 years ago. Updated over 3 years ago.

Priority name:
Category name:
WordPress Plugins
Target version:
Start date:
Due date:
% Done:


Estimated time:


From #5961

This request has come up again from one of the CAC Faculty Fellows. Boone, would you be willing to take a look at this plugin -- -- and see if it might be a good candidate for the Commons?

I'll review this for the upcoming release.

Related issues

Related to CUNY Academic Commons - Bug #5961: Multisite Clone duplicator pluginResolved2016-08-27

Related to CUNY Academic Commons - Feature #8836: Redesign site launch processAssigned2017-10-20

Related to CUNY Academic Commons - Bug #10228: NS Cloner network activatedRejected2018-08-26


#1 Updated by Boone Gorges over 4 years ago

  • Related to Bug #5961: Multisite Clone duplicator plugin added

#2 Updated by Boone Gorges over 4 years ago

  • Status changed from Assigned to Reporter Feedback

Luke - Can you say more about the use cases you're envisioning for the Faculty Fellows and other Commons users?

The specific plugin you've suggested can only be operated by the super administrator on a WordPress Multisite network. So, out of the box, it's not a user-facing, self-service tool. I assume that you're thinking more about such a self-service tool. Is that correct?

It's possible that we could use some of the back-end logic of a tool like ns-cloner-site-copier to build a self-service tool, but we'd almost certainly need to build our own front-end. We'd need to decide how to integrate this front-end into our existing tools. For example, should existing sites have a Dashboard option along the lines of "clone this site to a new site"? Or should there be some sort of select option during the new site creation process that allows you to select a clone source from your sites? Or perhaps we interface with the group creation process, since at least some sites are linked to groups? Having a better sense of the intended use case(s) for this feature will help us get a better handle on how this might work.

#3 Updated by Luke Waltzer over 4 years ago

I don't anticipate usage being so heavy yet as to justify building our own front end. Primarily thinking about faculty members who have selected themes, plugins, and structured ia and menus being able to duplicate this to fresh spaces.

I'd be happy to manage the cloning process, if you feel it's safe to roll out. Alternatively, perhaps we can scope out a new role for members of the Community Team with some Super Admin features that might allow use of a tool like this (and also facilitate some of the user management requests that occasionally come in).

#4 Updated by Boone Gorges over 4 years ago

Sure, this makes it easier. Do you envision having a public, official way to request a clone? Perhaps a line in our documentation (either on the Help site or on the site creation page) suggesting that they send an email to a certain person, or submit a Zendesk ticket? Or will this be secret-menu only?

#5 Updated by Luke Waltzer over 4 years ago

I think we should establish a) if we should do this and b) how smooth the process is and how much troubleshooting it might require before answering that question. If smooth, then integrating into the documentation would be great. If more challenging, then it could be off menu, members only special sauce.

#6 Updated by Boone Gorges over 4 years ago

I'll put the plugin onto the Commons for this release, and we can run some tests to see how it works.

#7 Updated by Boone Gorges over 4 years ago

  • Status changed from Reporter Feedback to Assigned
  • Target version changed from 1.11.7 to 1.11.8

Plugin added in

I'm moving this to the next milestone, so we can do some testing. I'll run a test or two in the next few days to make sure nothing catastrophic happens, then I'll ask Luke to look through to see if it does what he imagines such a plugin ought to do for the users who need it. Then we can talk about how/whether it fits into our support workflow.

#8 Updated by Boone Gorges over 4 years ago

  • Target version changed from 1.11.8 to 1.11.9

#9 Updated by Luke Waltzer over 4 years ago

Checking in on this... was there a hiccup on testing or are we holding off for another reason? If possible, would be great to deploy in next release so we can make it available to those teaching on the Commons this fall (in a limited capacity).

Happy to help with testing, if needed.

#10 Updated by Boone Gorges over 4 years ago

No hiccup, I just haven't had time to give this the thorough look that it needs before I feel confident with it. The plugin is on the production site. If you want to try it, you may. Otherwise, I've slated some time later this week to look more closely at it myself. Sorry for the delay.

#11 Updated by Luke Waltzer over 4 years ago

No worries, but confirming: I'm clear to network activate this on the Commons to run a test? would you rather give it a run in the dev environment, or are you confident it's safe?

#12 Updated by Boone Gorges over 4 years ago

  • Status changed from Assigned to Reporter Feedback
  • Target version changed from 1.11.9 to 1.11.10

Sorry for the delay here. I've done some initial testing and the plugin looks pretty good from my end. It seems to clone all content (posts, tags/categories, comments, media/uploads) and makes necessary in-content URL swaps. It does not copy over user membership, but I'm guessing that's mostly a good thing for your purposes.

Do you mind giving the plugin a test to see that it suits your needs for the fall? It's on the production site and you have access as a super admin.

#13 Updated by Boone Gorges over 4 years ago

  • Assignee changed from Boone Gorges to Luke Waltzer
  • Target version changed from 1.11.10 to Not tracked

I'm going to move this out of the milestone and assign to Luke - Luke, please let me know if you have issues as you test.

#14 Updated by Luke Waltzer over 4 years ago

Documenting here...

Here's report on most recent successful clone:

Old Site:
New Site ID:
New Site:
Tables cloned:
Replacements made:
Files/directories copied:
Total process time:
6.5443 seconds
Log file:

Clone threw these permission errors:

I accessed this clone via, though one can also clone a site via The second route, however, does not allow you to select a new site name (appends "-2" to original site name).

The first clone I tried (accessed via NS-Cloner interface), but then I did a couple of successful ones via /sites.php. The one reported above was via NS-Cloner interface.

Could use some more robust testing, which I can do when I'm back from my time away. In the meantime, Marilyn should know we have this functionality in case folks ask for it... adding Stephen and Marilyn as watchers.

#15 Updated by Boone Gorges about 4 years ago

  • Status changed from Reporter Feedback to Resolved

Sounds to me like the plugin is pretty much working - the permissions errors with the log files are not something that can be easily fixed (the plugin saves logs in a lousy place, and doesn't make it easy to override this location with something more sensible), but these errors don't appear to affect the ability of the tool to do the cloning itself.

Marilyn, please make a mental note that the tool exists, so if someone approaches support with a request to duplicate an existing site, I can generally help with that.

#16 Updated by Boone Gorges about 4 years ago

#17 Updated by Raymond Hoh over 3 years ago

I had a chance to use the NS Cloner plugin for #9346 and can verify Luke's assessment in comment 14.

When cloning, we'll most likely want to customize the new subdomain, so to do that, use the "Network Admin > NS Cloner" page.

We should not use the "Clone" functionality located on the "Network Admin > Sites" page. We should probably look to remove the "Clone" links from that page to avoid confusion.

#18 Updated by Boone Gorges over 3 years ago

  • Related to Bug #10228: NS Cloner network activated added

Also available in: Atom PDF