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?

1
1

first create a user from this function

$user_id = 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

/wp-admin/network/site-new.php

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

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *