WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My customer has a site, which has WP blog + vBulletin forum. Now he wants to allow vb users to have their own blog, by modifying current WP blog to WPMU network.

So I want to create a button, which could be clicked by vb user and new site will be created in network for him. How can I create new site programmatically for WPMU network?

share|improve this question
up vote 3 down vote accepted

first create a user from this function

wpmu_create_user( $username, $password, $email )

then used this function to create blog

wpmu_create_blog( $newdomain, $path, $title, $user_id , array( 'public' => 1 ), $current_site->id );

for detail you can see this file


after viewing this page you will have the exact idea what you want to do.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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