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.
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.
Method 1: the "Lost your password?" link
The normal route, and the one to try first every time.
-
Go to your login page
This is your site's address followed by
/wp-login.php, for exampleyoursite.com/wp-login.php. -
Click "Lost your password?"
It sits just below the login form.
-
Enter your username or email address
Either works. WordPress looks up the matching account either way.
-
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.
-
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.
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.
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.
-
Open phpMyAdmin
It is in the databases section of your control panel. See using phpMyAdmin if you have not used it before.
-
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_NAMEvalue in that site'swp-config.php. -
Find your account and click Edit
Your account is the row matching your username, in the
user_logincolumn. -
Set a new value for user_pass
Type your new password into the value field for
user_pass. -
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
MD5before saving. -
Save, then log in with the new password
Go back to
wp-login.phpand sign in as normal.
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 can | Use |
|---|---|
| Reach the login page and your email | Method 1 — the reset link |
| Log in as a different administrator | Method 2 — reset it from Users |
| Reach neither, but can reach phpMyAdmin | Method 3 — edit the database |
| None of the above | Contact 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
Submitting the login form just bounces you back to it — usually a URL mismatch, cookie problem, or a plugin, worked through in order.
How to change the WordPress admin usernameWordPress will not let you rename a username directly — create a new administrator account instead, or rename it through the database.
How to use phpMyAdminOpening phpMyAdmin from your control panel and using it to browse, edit, import and export a database.
How to fix WordPress not sending emailThe built-in mail function WordPress uses by default is unreliable — the fix is an SMTP plugin configured with real mail server credentials.