How to reset WordPress password directly in database?
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.
WordPress stores passwords using MD5 hash without any additional things like salts. Therefore, you have to run query that updates password with MD5 function.
We know You like AdBlocker. Everything we do here is voluntary and it would not be possible without advertising.
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') WHERE ID = 1;
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.