wp_insert_user always tries the same user name
Before doing anything, make sure that the user account doesn’t already exist. This is really easy to do with the username_exists function. if( null == username_exists( $username ) ) { echo “user not exist”; } use the above code and see what happen then do as below $user_id = wp_create_user ( $email_address, $password, $email_address ); … Read more