How to use wp_insert_user on WordPress Multisite?

You can use the add_user_to_blog function after creating the user.

$userid = 1;
$blogid = 5;
$role="administrator";
add_user_to_blog( $blogid, $userid, $role );

Leave a Comment