1

I have a Multisite installation created in WordPress hosted at example.com with websites at example.com/site1, example.com/site2 etc.

Is it possible to create an exact copy of example.com at example.com/site3?

Blog Copier and NS cloner don't allow you to ever create a copy of the root site for some reason. What would the technical limitations behind this be?

1 Answer 1

1

Yes, it is possible. This is the feature I wrote during the last days for the pro version of Multilingual Press.

One problem is that wp_upload_dir() does not always return the correct values after calling switch_to_blog(), that makes attachment copies unnecessary difficult. Besides that most things are simple. TRUNCATE the new blog’s tables and replace them with the content of the source blog, then update the values which are different.

Things get tricky when you need new relationships between some selected blogs, but all that is not special for the root site.

2
  • So copying the attachments from the root site to another site is more difficult then from one site to another because of unreliability in the switch_to_blog() function? Should WordPress, or the plugin authors fix this? Commented Aug 21, 2013 at 14:58
  • I think this is a WordPress bug. I haven’t found the time to narrow it down yet. Once I do that, I will write a proper report and probably a patch.
    – fuxia
    Commented Aug 21, 2013 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.