Recover Your Lost WordPress Admin Password For (Localhost)

0 Flares 0 Flares ×

If you have a blog powered by WordPress or if you are a WordPress theme or plugin developer then you must have a local installation of WordPress. Some times you forget the admin password for your self hosted live WordPress blog, but you can easily recover it by clicking on the Forgot Password link on login page. But what if you forget the password for the local installation of WordPress as you do not have an email setup? Do not worry for that, in this article I will provide a simple solution which will reset your local WordPress admin password.

How to reset admin password for localhost WordPress

In this simple solution we will use the PhpMyAdmin to reset the admin password. Login to your localhost PhpMyAdmin and select the database from the left panel. Now select the table wp_users (wp prefix may vary according to your installation setting). It will display all the data under this table find the admin user under the column user_login and click on the edit icon.

recover wordprss admin password

Now for the user_pass row select the MD5 under the column “Function” from the drop down and enter the desired password for the admin user under the column “Value”, in our case we have taken temp as the new password. Click on the Go button at the bottom of the page. This will reset the admin password to temp.

recover wordpress admin password

Technology at the background:

In WordPress all the passwords are encrypted with MD5 and you can not decrypt them back. That is why we need to set a new password again as we can not decrypt the password stored in the database. When you select the Function as MD5, PhpMyAdmin creates the MD5 encrypted value for the value and save it to the table.

Alternate Way If you Do Not Have PhpMyAdmin:

If you do not have PhpMyAdmin installed you can reset the password by executing the below SQL script from the MySQL command line client. Here we will use the md5 function of MySQL.

UPDATE wp_users SET user_pass=md5('temp') WHERE user_login='admin';

So this is the complete process how you can recover your WordPress admin password that is installed on localhost.


+Ayodhyanath Guru holds a B.Tech degree in Electrical Engineering and has worked with various prestigious clients in the IT industry and presently working as a Software Engineer. He is a part time blogger and presently authors the Jafaloo.Com blog. Being a tech enthusiast Guru likes to surf the web and blogs about interesting technical topics like How-To guides, freewares, Tutorials, Software, Gadgets, web applications etc. Apart from blogging he likes coding in Java/J2EE and PHP.

You may also like...

1 Response

  1. Denise says:

    Thank you – Thought I was going to have to re-install WP. –> I didn’t forget my pswd though – it seems to have changed on it’s own or something got messed up along the way when I added a new theme to the contents folder? Heard of this?

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 0 Flares ×