Site duplicator/clone plugin
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 -- https://wordpress.org/plugins/ns-cloner-site-copier/ -- and see if it might be a good candidate for the Commons?
I'll review this for the upcoming release.
#2 Updated by Boone Gorges about 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 about 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 about 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 about 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.
#7 Updated by Boone Gorges about 4 years ago
- Status changed from Reporter Feedback to Assigned
- Target version changed from 1.11.7 to 1.11.8
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.
#9 Updated by Luke Waltzer almost 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 almost 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.
#12 Updated by Boone Gorges almost 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.
#14 Updated by Luke Waltzer almost 4 years ago
Here's report on most recent successful clone:
New Site ID:
Total process time:
Clone threw these permission errors: https://pastebin.com/DBJ5hcg4
I accessed this clone via https://commons.gc.cuny.edu/wp-admin/network/admin.php?page=ns-cloner, though one can also clone a site via https://commons.gc.cuny.edu/wp-admin/network/sites.php. 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 over 3 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.
#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.