1$website = "http://example.com";
2$userdata = array(
3 'user_login' => 'login_name',
4 'user_url' => $website,
5 'user_pass' => 'plain_password' // When creating an user, `user_pass` is expected.
6);
7
8$user_id = wp_insert_user( $userdata ) ;
9
10// On success.
11if ( ! is_wp_error( $user_id ) ) {
12 echo "User created : ". $user_id;
13}
14