vector image from freepic

Change / Reset WordPress password using MySQL / PHPMyAdmin

Recover lost or hacked WordPress password from PHPMyAdmin / MySQL.

Imagine someone somehow manages to break into your WordPress dashboard, and changes it’s password and email. If you request a “Forget Password”, the reset password link will be mailed to the new email, not to your email. The result will be — you losing control over your WordPress-powered site. I think that’s enough to picturize that traumatic situation.

In another case you may work in localhost. Some how you lost/forgot the WordPress password. Typically Forget Password option can’t send password recovery mail to your admin mail address from localhost. In this type of scenario you may fall in big trouble because you can’t recover password through typical recovery process.


There is very easy way to change password from Mysql/PHPMyadmin database quickly.

Go to your websites database where you have installed your WordPress website.

How do I access to my server database?

Most of us, we use cpanel to manage hosing services. When you will login your cpnale you will see a option named PHPMyAdmin.

For local development we generally use XAMM/Wamp/Mamp or this type of pre-packaged Apache installed software. When your localhost service provider software is running, then you can easily access to PHPMyAdmin by this url.

PHPMyAdmin of XAMPP Server

Now you need to go that specific database which is belongs to your wordpress website from left side database list.

I dont’t know my website’s database name

ok, don’t be afraid. It’s too easy to retrieve database name of a wordpress website. All you need to do, go to wordpress website’s root directory and open wp-config.php file.

In wp-config.php file you will see 3 constant DB_NAME , DB_USER , DB_PASSWORD. This 3 constant holds your website’s database name , database user and database password.

Now we got our database name, so we are ready to reset password from PHPMyAdmin.

Go to your website database from PHPMyAdmin and you will see tons of tables. You need to go wp-users / **somethings-users (as your wordpress website table prefix).

Click Edit

Replace whatever in the user_pass field and select MD5 option for function.

Click on Go.

That’s it. your website’s password will be changed. Now you can login with this new password to websitedomin/wp-admin.

I tried my best to explain the whole procedure very simply as I can. If you have any confusion or question, feel free to waste the comment section :)