The MU forums have moved to

Wordpress Mu New Blog Created Cloned Copied xml import automatically (6 posts)

  1. MacJedi
    Posted 13 years ago #

    I have spent forever reading and researching on requests others have had for cloning or creating a new blog that would be pre populated with pages, posts, categories, links and other essential content from the main blog or from a template blog. As I consider this request, it seems the most logical thing to do is create a plugin that will upon the creation of a new blog... target an exported xml file from a blog that had the content desired for the new blog and import it as part of the process of creating the new blog. This to me would satisfy the request so many have had for cloning a blog during the creation of a new blog.

    Am I talking into the wind? Does anyone know of a plugin that automatically targets and imports an xml file into a new blog upon/during it's creation automatically?

    This would be completely successful if the originating blog were created using relative links -page ID links example - ?p=37- instead of permalinks, especially if using WPMU sub domain mode.

    Any thoughts, information concerning a plugin that does this or should I attempt to create a plugin to do this? or is anyone working on a plugin already?

    Thanks for your input in advance

  2. SteveAtty
    Posted 13 years ago #

    If I was you I'd create a "dummy blog" which contains all the relevant information you need such as posts, terms, term_relationships, terms_taxonomy etc. you could do this by either creating a blog and leaving it there as a hidden one or you could create it then copy the tables to a set of different names and then drop the original blog.

    Then when I'd got that ready I'd probably modify the signup code (not sure if there is a hook for this) so that on blog activation it runs a block of custom SQL which does INSERTs into the new blog tables from the "dummy" blog tables, making adjustments for the post GUIDs and post authors.

  3. DeannaS
    Posted 13 years ago #

    The hook for creating a new blog is wpmu_new_blog. As for which approach is better, I'm not sure. They both have advantages. The xml approach makes it easier to install the plugin (creating the same default blog) on multiple instances of WPMU with the same result. The hidden blog approach bypasses the need for changing file permissions of an xml file (one of my quibbles with the Terms of Service plugin).

    It's not something we've had the need to do at this point, so I haven't spent too much time thinking about it.

  4. JsonB123
    Posted 13 years ago #

    I'm interested in this functionality and I'm wondering if anyone had successfully executed it, and how? Is there an import xml function that one could just write a script for that could target an xml file on the server?

    Or is it faster and cleaner to just dump a SQL file of the template blog and run an import on any new blog tables that are created?

  5. Dukessa
    Posted 13 years ago #

    Im not sure this is what I need to achieve this:

    I have 5 domains
    I want to have the SAME posts/reg users on EVERY domain (so the content is cloned) BUT on every domain I need a different header image and different seo settings.
    Basically it's like having 1 single blog, cloned on different domains which have slightly different theme.

    Im not even sure that I need WPMU for this... do I?
    And if yes, how do I clone the content for every domain... and how do I style the header image and have custom seo settings for each one?

  6. jtf1117
    Posted 13 years ago #

    I would say this is not what you want Duke. Can't help with that.

    But for the original post, I'd like to do the same thing: have a default blog with my 7 pages already pre-populated with default data. This would save me a lot of time!

About this Topic