Guide WordPress

How to reset a WordPress password

Three ways to reset a WordPress password, from the ordinary email link to editing the database directly when nothing else works.

Updated 6 min read Beginner

There are three ways to reset a WordPress password, and which one applies depends entirely on what you can still access. Start with the first one you can actually reach.

The normal route, and the one to try first every time.

  1. Go to your login page

    This is your site's address followed by /wp-login.php, for example yoursite.com/wp-login.php.

  2. Click "Lost your password?"

    It sits just below the login form.

  3. Enter your username or email address

    Either works. WordPress looks up the matching account either way.

  4. Open the email and follow the link

    It contains a one-time reset link. Follow it and you will be asked to set a new password immediately.

  5. Choose a strong password

    WordPress suggests a random one and shows a strength indicator. Use a long, unique password rather than editing the suggestion down to something memorable.

The link expires

A reset link is valid for a limited time and works once. If it has expired or already been used, go back to the login page and request a new one.

Method 2: from inside the dashboard

If you are already logged in as an administrator and want to reset someone else's password — a colleague who is locked out, for instance — you do not need their email access at all.

  • Go to the Users section of the dashboard.
  • Open the account that needs a new password.
  • Find the password field and click Generate Password, or type a new one directly.
  • Save. The change takes effect immediately, and you can pass the new password to that person through whatever channel you trust.

You can also reset your own password this way if you are logged in but simply want to change it — there is no need to log out and use the "lost password" flow just to update a password you already know.

Method 3: change it directly in the database

For when you are locked out entirely: no working login, and the reset email is not arriving or is going to an inbox you can no longer reach. This edits the password stored for your account directly, from outside WordPress.

Take a backup first

You are about to hand-edit a live database table. Export the database, or at minimum the wp_users table, before you touch anything, in case a typo affects the wrong row.

  1. Open phpMyAdmin

    It is in the databases section of your control panel. See using phpMyAdmin if you have not used it before.

  2. Select your site's database, then the wp_users table

    If you are not sure which database belongs to which site, the answer is the DB_NAME value in that site's wp-config.php.

  3. Find your account and click Edit

    Your account is the row matching your username, in the user_login column.

  4. Set a new value for user_pass

    Type your new password into the value field for user_pass.

  5. Change the function dropdown next to it to MD5

    This is the step people miss. WordPress stores passwords hashed, not as plain text, and phpMyAdmin will happily save your new password as plain text unless you tell it to hash it first. Set the function for that one field to MD5 before saving.

  6. Save, then log in with the new password

    Go back to wp-login.php and sign in as normal.

Why MD5, when WordPress uses stronger hashing now?

Recent WordPress versions store passwords with bcrypt, but the login form still recognises an MD5 hash on first use and automatically upgrades it to the modern format the moment you log in successfully. You do not need to do anything extra — using MD5 in phpMyAdmin is still the correct, supported way to set a password by hand.

Locked out and not sure which method applies

You canUse
Reach the login page and your emailMethod 1 — the reset link
Log in as a different administratorMethod 2 — reset it from Users
Reach neither, but can reach phpMyAdminMethod 3 — edit the database
None of the aboveContact support with proof you own the account

Once you are back in

If you were locked out because you had genuinely forgotten the password, that is routine. If you were locked out because something changed the password without your knowledge — the admin email was altered, or you find a user account you did not create — treat it as a security incident rather than an inconvenience: change every password on the site, check the Users list for anything unfamiliar, and read securing a WordPress site and cleaning a hacked WordPress site before assuming the problem is only a forgotten password.

Frequently asked questions

The reset email never arrives. What now?

Check that the admin email address stored in the account is actually one you can still access, and check spam. If neither turns anything up, see why WordPress is not sending email — a site that cannot send any mail cannot send a reset link either, and the fix is usually the same one.

Can I reset a password without database access?

You need either a working reset email or access to the database — there is no third route. If you cannot log in, cannot receive the email, and have no database access, contact your host: with appropriate verification, we can reset it from the server side.

Will resetting the password log everyone else out?

No. A password reset only affects the one account you change. Other users keep their own logins and their own active sessions untouched.

Related reading