Skip to content
Advertisement

WordPress incorret password for username or email, added using “wp_insert_user”

So i have created my own user, using below code. I am more than certain that i have a correct password when i login. But for some reason that I dont know i always have “The password you entered for the email address/username is incorrect”. Can someone shed some light on me!!!

JavaScript

P.S I confirm that my user exist. WordPress just cant validate the password.

Advertisement

Answer

EDIT

You’re using user_password instead of user_pass.

I lost an hour using your parameters.


Additionally, it seems that you should also be able to use wp_create_user() as you’re not doing anything fancy.

wp_create_user()

Creates a new user with just the username, password, and email. For more complex user creation use wp_insert_user() to specify more information.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement