To reset a WordPress password in phpMyAdmin, open your hosting panel, go to Databases and phpMyAdmin, open the wp_users table, edit your user row, and either change user_email so you can use Lost your password, or replace user_pass with a new hashed password. Always back up the database first.
When should you reset a password in phpMyAdmin?
Use this method only when the normal route fails. Always try the Lost your password link on the login page first. It emails you a reset link, and most people are done in two minutes.
The database route is for the case where you forgot your username and password and your recovery email is not working.
You must own or administer the site, and you need access to the hosting panel. This is a recovery tool, not a way into other people’s sites.
Before you start: back up and check your table prefix
Export the database from phpMyAdmin first. A wrong edit can lock you out, and a backup gives you a way back.
Next, check the table prefix. Tables usually start with wp_, but some sites use a different prefix. Open the left-hand list in phpMyAdmin and find the table that ends in users.
Method A: change the admin email, then use Lost your password
Open phpMyAdmin from your hosting panel by going to Your Website Overview, Databases, then phpMyAdmin. Locate and open the table named wp_users.
Find your admin user and click Edit. Locate the user_email field and change it to an email you can access. Then go to your WordPress login screen and click “Lost your password?” to receive a reset link.
This is the cleaner method. It never exposes your new password to a database, and WordPress handles the hashing.
Method B: set a new password directly in the database
Use this when email reset will not work, for example when mail delivery is broken on the server.
In the user_pass field, delete the existing encrypted string and replace it with a hash of your new password. You can then log in to your dashboard immediately.
The safer way to generate the hash
Many guides suggest an online WordPress password hash generator. A safer approach avoids typing your real password into a third-party website:
- In the row edit screen, find the user_pass line.
- In the Function dropdown beside it, choose MD5.
- In the Value box, type your new password in plain text.
- Click Go to save.
phpMyAdmin hashes the value as it saves. WordPress accepts the older hash format and upgrades it when you log in successfully.
Log in and change it again
Log in with the new password, then open Users, Profile and set another strong password, so the final stored hash is WordPress’s own current format.
An alternative: reset with WP-CLI
If your host gives you command-line access, WP-CLI can set a password with a single command, wp user update followed by the username or ID and the new password option. It avoids the database edit entirely. Ask your host whether WP-CLI is installed before you try it.
How WordPress stores passwords
WordPress never keeps your password as readable text. It stores a hashed version, a scrambled string that cannot be turned back into the original. When you log in, WordPress hashes what you typed and compares the two. That is why you cannot simply read your old password in phpMyAdmin, and why replacing the stored string with a new hash is enough to change the password.
Keep a recovery plan so this never happens again
Create a second administrator account with a different email address and a strong password, and store its details in a password manager. If the first account is ever locked, you can sign in with the second and reset the first from the Users screen. Also keep your hosting login details safe, since your hosting panel is the key to the database.
After you get back in: a short security review
- Open Users and check that every administrator is someone you recognise.
- Remove accounts you do not know.
- Update WordPress, plugins and themes.
- Turn on two-step login if you use a security plugin.
- Store the new password in a password manager.
If you did not forget the password and cannot explain why you were locked out, treat it as a possible break-in and scan the site.
What if it still does not work?
Check that you edited the correct user row, that you saved with Go, that the function was set to MD5 and that you are on the right site. If you manage several WordPress installs in one hosting account, each has its own database, so confirm the database name in wp-config.php.