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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)