Skip to content

How to reset WordPress password directly in database?

This How to is more than 2 years old and may be outdated.

Report an error in the How to

Let's assume that you have WP project, Database access and NO WP admin access. In this “how to” we'll cover process of updating admin user password directly in database.

How to reset WordPress password directly in database?

WordPress stores passwords using MD5 hash without any additional things like salts. Therefore, you have to run query that updates password with MD5 function.

Connect to WP DB

You can use phpMyAdmin or any other tool you prefer, and simply execute following query:

UPDATE wp_users
SET user_pass = MD5('MyNewPassword#95174546')

Don’t forget to adjust user ID, password field and table prefix (wp_) eventually.

Alternative option is updating email in DB and then following standard password reset procedure.

If you have any questions, you can always ask Daisy for help

Be the first to comment