Recover Your Lost WordPress Admin Password For (Localhost)
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.
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.
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.
So this is the complete process how you can recover your WordPress admin password that is installed on localhost.