How to Change a WordPress Password with phpMyAdmin (When Reset Email Fails)

How do you change a WordPress password when you can’t log in and the password reset email never arrives? It happened to me, even after years of running WordPress blogs. The fix was to change the WordPress password directly in the database with phpMyAdmin, which your web host provides. It takes about five minutes, and here’s exactly how I did it.

Quick answer: Log in to your hosting control panel and open phpMyAdmin. Select your WordPress database, open the wp_users table and click Edit on your user. In the user_pass field, type a new password, choose MD5 from the Function drop-down and click Go. Log in with the new password; WordPress upgrades the MD5 hash to its secure format automatically.

My lost WordPress password problem

I created a new WordPress blog with a one-click Softaculous install. When I went to the login screen, it wouldn’t accept the password I’d set during installation. It was a long, complex password and somehow hadn’t been saved in my LastPass password manager. Even the emergency WordPress password reset script wasn’t an option here.

When the WordPress password reset email doesn’t arrive

I clicked Lost your password? on the login screen, and WordPress said a reset link had been sent to my email.

Lost WordPress password reset screen

But no email arrived, even after several tries. That was strange, because the “installation successful” email had arrived fine, so the email address was correct. That email listed the username and login URL, but the password was hidden with asterisks.

Missing reset emails are common. Many hosts don’t send WordPress email reliably, and messages often land in spam. Check your spam folder first. For the long term, an SMTP plugin such as WP Mail SMTP sends WordPress email through a proper mail service so reset emails get delivered.

How to change a WordPress password with phpMyAdmin

Before you start: take a backup of your WordPress database. You’re editing it directly, so a backup lets you undo any mistake.

1. Open phpMyAdmin

Log in to your hosting control panel (cPanel, hPanel, Plesk or similar) and open phpMyAdmin from the Databases section.

phpMyAdmin in hosting control panel

2. Open the wp_users table

Choose your WordPress database in the left panel. If you’re not sure which one it is, look for DB_NAME in your site’s wp-config.php file. Then click the wp_users table. Your table prefix may be different, like abcd_users; it’s set by $table_prefix in wp-config.php.

WordPress wp_users table in phpMyAdmin

3. Edit your user

Find your username in the user_login column and click Edit on that row.

Edit WordPress user in phpMyAdmin

4. Replace the password

The user_pass field holds a long string of characters. That’s a hash, not your actual password, so it can’t be recovered or pasted into the login form. Delete it and type your new password.

Change WordPress password in user_pass field

5. Choose MD5 and save

In the Function drop-down next to user_pass, choose MD5. This turns your password into a hash when it’s saved.

Choose MD5 function for WordPress password

Click Go to save the change.

Save new WordPress password in phpMyAdmin

6. Log in with your new password

Go to your site’s /wp-admin login page and log in with the new password.

Is MD5 safe for WordPress passwords?

MD5 on its own is weak, but you only use it briefly here. WordPress still accepts an MD5 hash for the first login, then immediately replaces it with its own secure hash. Since WordPress 6.8 switched to bcrypt, that’s a strong bcrypt hash. So log in straight away after changing the password, and choose a long, unique password.

Other ways to reset a WordPress password

  • WP-CLI: if your host offers SSH, run wp user update admin --user_pass="NewStrongPassword", replacing admin with your username. See the WP-CLI user update docs.
  • Another admin account: if another administrator can log in, they can set a new password for you under Users > Edit.
  • Your host’s tools: Softaculous, Hostinger hPanel and other control panels can often reset the WordPress admin password from the installation’s settings.

WordPress.org also has an official guide to resetting your password with more methods.

Frequently asked questions

Can I see my current WordPress password in phpMyAdmin?

No. WordPress stores only a hash of the password, which can’t be turned back into the original. You can only replace it with a new one.

Why isn’t my WordPress password reset email arriving?

Many web hosts don’t send PHP email reliably, and messages often end up in spam. Install an SMTP plugin to send WordPress email through a proper mail service.

Will changing the password in the database log out other users?

No. It changes only the password for the user you edited. That user will need the new password next time they log in.

Found this useful? Share it with someone who needs it.

Get our free weekly email: new tech guides and tools, no spam.

New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.

One email a week. Unsubscribe anytime. See our privacy policy.

Fresh Tech Guides

Leave a Reply

Your email address will not be published. Required fields are marked *