BizzQuébec

Sign inFR

WordPress password reset not working? Here is how to do it with phpMyAdmin

When the reset email never arrives, you take back control directly in the database. The steps, and the precautions before touching anything.

You are locked out of your WordPress admin. You click "Lost your password?", and the email never comes — because the server does not send email, because the registered address no longer exists, or because you are working locally. One door remains: the database.

Before you start: back up

You are about to modify the site's database. A botched move can break the login for good.

In phpMyAdmin, select the database, go to the Export tab, quick method, SQL format. You get a file. Keep it for the duration of the operation. Thirty seconds that save you a bad evening.

The steps

1. Open phpMyAdmin. It is in cPanel, under Databases. Locally, it is `localhost/phpmyadmin`.

2. Find the right database. If several sites share the same hosting, several databases appear. The exact name is in `wp-config.php`, on the `DB_NAME` line.

3. Open the users table. It is called `wp_users` — or `xyz_users` if the prefix was changed at installation.

4. Edit your account. Find your row in the `user_login` column, click Edit.

5. Change the password. On the `user_pass` row you see a long unreadable string: the encrypted password. In the "Function" column, choose MD5, then type your new password in plain text in the value field. phpMyAdmin will encrypt it on save.

6. Run it, then sign in again at `/wp-admin` with the new password.

Why MD5 still works

WordPress has not used MD5 for its own passwords in a long time — it uses stronger hashing. But it kept a compatibility path: when it meets an MD5 password, it accepts it once, then replaces it automatically with the modern version.

In other words, MD5 serves as a temporary way in. From your first sign-in, WordPress brings the security back up to standard on its own.

If that is not enough

The account's email address is wrong. Change `user_email` too while you are in the same row.

Your account is no longer an administrator. Look at the `wp_usermeta` table, the `wp_capabilities` row for your user ID. It must contain `administrator`.

You cannot find your account. Nothing stops you from inserting a new row in `wp_users` and giving it administrator rights in `wp_usermeta`.

Fixing the underlying problem

Taking back control is one thing; not having to do it again is another. The cause is almost always the same: WordPress cannot send email from the hosting server.

The durable fix is to route the site's email through a real sending service (SMTP), configured with a plugin. Notifications, order confirmations and contact forms depend on it just as much as password resets do.

Also worth watching