Skip to content

Tutorials WordPress Beginner1 min read

How to Reset a WordPress Admin Password

Locked out of WordPress? Reset the admin password by email, through phpMyAdmin or with WP-CLI — and secure the account afterwards.

By ZSOLNET Editorial Team Updated

Key takeaways

  • Try the built-in reset first; check spam for the email.
  • phpMyAdmin lets you set a new password directly in wp_users.
  • Investigate if you didn’t change the password yourself.

Option 1: “Lost your password?”

On the login page (/wp-login.php), click Lost your password? and enter your username or email. If the email doesn’t arrive, check spam — or the site may not be able to send mail, in which case use one of the options below.

Option 2: phpMyAdmin

  1. In cPanel, open phpMyAdmin and select your WordPress database.
  2. Open the wp_users table (your prefix may differ from wp_).
  3. Click Edit on your user.
  4. In user_pass, choose MD5 from the Function menu and type a new password in the value field.
  5. Click Go.

WordPress upgrades the stored hash to a stronger one the next time you log in.

Option 3: WP-CLI

If you have SSH access:

wp user list
wp user update admin --user_pass='a-new-strong-password'

Afterwards

  • If you didn’t change the password yourself, assume the site may be compromised: change all admin passwords, check for unknown admin users and scan for malware.
  • Set up working email delivery (for example via SMTP) so password resets reach you next time.
Share X LinkedIn Facebook

Log in to your account

Manage your domains, hosting and invoices in one place.

Secure connection straight to the ZSOLNET client area.

No account yet?