Creating a new blog using PHP

I have a Multisite where I’m creating a user from a PHP file, using the code below:

define('WP_USE_THEMES', false); 
require_once (dirname (dirname (__FILE__)) . '/mygroup/wp-blog-header.php'); 
require_once (dirname (dirname (__FILE__)) . '/mygroup/wp-includes');

$org_username=$_SESSION['user_name']; 
$org_password=$_SESSION['org_password']; 
$org_email=$_SESSION['org_email']; 
$user_id = wp_create_user($org_username, $org_password, $org_email);

Now, how would I create a blog for the same user?

Related posts

Leave a Reply

1 comment