How to reset a WordPress admin password?

There are three ways:

  1. Lost your password link: on the login page click Lost your password?, enter your username or email, and open the reset link from the email.
  2. WP-CLI: change it from the command line (good when email does not work).
  3. phpMyAdmin: edit the user_pass field of the user in wp_users and choose the function MD5 for the new password. WordPress will upgrade the hash on the next login.
Terminal output

$ wp user list –fields=ID,user_login,user_email
ID user_login user_email
1 admin admin@example.com
$ wp user update admin –user_pass="NewStrongPass#2026" –skip-email
Success: Updated user 1.

Note: Use a long password and a password manager. See WordPress Security.

Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.