In order to use this plugin you need to create CSV formatted data that describes the information that you would like imported into your WPMU installation.

Each line of your CSV data should contain the following information:

blog_domain, user_name, blog_title, blog_topic

Where the values are:

  • blog_domain (Mandatory): the domain name of the blog, this should only contain alphanumeric characters and be in all lowercase. If the blog domain is empty then users will be added to the site’s root blog.
  • user_name (Mandatory): the login id of the user to be added as a user of the blog.
  • blog_title (Optional): the title of the blog.
  • blog_topic (Optional): the name of the blog topic that this blog will be categorised under. These topics are setup under the ‘Blog Topic Management’ tab. A blog_title must be chosen if you wish to set the blog topic. (Requires cets_blog_topics plugin.)

When each line is processed, if the blog doesn’t exist then it is created. The user provided is set as a registered user of the blog with the user level specified.

Important Note: There is a limited number of lines that will be processed. This limit is set by GB_BULK_CREATE_BLOGS_LIMIT which can be changed at the top of gb_bulk_create_blogs.php if desired. The reason for this limit is that creating a large number of blogs can take a lot of time and it is easy to hit PHP’s max_execution_time. If you want to be able to import large amounts of blogs then you will need to increase PHP’s max_execution_time to an appropriate value.

9 Responses to “How to Bulk Create Blogs”


  1. [...] to the number of users you can assign in one batch (26 users), but Greg gives you instructions on how you can modify the limit by editing the plugin. The limit is set so you don’t hit php’s max execution [...]


  2. [...] to the number of users you can assign in one batch (26 users), but Greg gives you instructions on how you can modify the limit by editing the plugin. The limit is set so you don’t hit php’s max execution [...]

  3. Julie Says:

    Thanks for a great plug-in Greg!

    Is there any known way to add a variable // modify the php file to set a non-default theme on blog creation?

    (I’m using Deanna’s cets_blog_defaults plugin but the parameters get overridden by your plugin – and as you did with blog_topic I suspect there’s a way to have the 2 plugins talking to each other).

    thanks,
    Julie

    • Greg Says:

      Julie when you setup a template manually there is an option (near the bottom) with a drop down box to choose which theme you would like to use. If you create a template by cloning a blog then it should copy the theme which that blog uses.

  4. Julie Says:

    Thanks Greg, much appreciate your reply. I can confirm that I have selected my new theme in the CETS dashboard, and it gets applied correctly when I manually create a blog from the wpmu dashboard.

    However, in this case I’m using your plugin to create blogs for users that I have imported/migrated from an existing community, and the blogs created all get the standard rubics theme.. (so I suspect I need to edit the php to fetch the theme variable from CETS?)

    • Greg Says:

      Hi Julie, the theme that gets applied should be whatever theme you have selected in the template you’ve created. You shouldn’t need to edit anything to have a theme chosen properly. If you want the template to defer to the CETS settings then you’d need to change some things.

      Greg

  5. Julie Says:

    doh, only just realised what you meant by ‘template’ – now all installed and tested, thank you very much and sorry for waisting your time!

    Very very helpful plugin combination – do you take donations?

    Julie

  6. Ryan Says:

    I teach high school and run a WordPress install to host student portfolio Websites. I used your plugin last year with success. I had student websites on a separate domain from the class Website. The class website is: http://maclab.edisonchargers.com/ and students were at: http://boltpress.edisonchargers.com/.

    Anyhow, this year I didn’t want them on a separate domain. So, I created a folder in my class site folder (/blogs): http://maclab.edisonchargers.com/blogs and have separate install of WordPress.

    Long story short . . . when I use your plugin from http://maclab.edisonchargers.com/blogs it wants to create the sites like http://maclab.edisonchargers.com/site1, http://maclab.edisonchargers.com/site2, etc. instead of http://maclab.edisonchargers.com/blogs/site1, http://maclab.edisonchargers.com/blogs/site2, etc.

    Do you know a way to tweak the plugin to have the sites created under /blogs instead of the main domain?

    • Greg Says:

      Hi Ryan
      I’ll have a look though the plugin and see what I find. As I have always used sub-domains the sub-directory settings aren’t very well tested.
      Greg


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.