How to Reset WordPress Admin Password on Localhost?


What if you are using wordpress on localhost and accidently forgot your password! It’s a much panic condition and everyone want to get rid of it. So how to reset the wordpress admin password on localhost is something easy to resolve. Here we are going to reset WordPress admin password on localhost.

Why password reset request doesn’t work on Localhost?

Localhost is always used as a local server within the organizations or on a personal computer and is invisible to the general public

Most of the users install WordPress on localhost on their personal computers for testing the changes in their websites / web pages, design, latest plugins to complete their tasks fully before launching to internet for the public usage.

Let’s stick to the topic;

If you forget your WordPress admin password during working on localhost, then you can not reset or change it with the normal password reset option in WordPress.

Which is all about an email suggested with a reset link sent to your inbox to reset your password. So, first thing you need is to enable the server email function.

By default, the function is turned off on local servers which completely pointing that the WordPress will be failed to send the password reset email.

Reset WordPress Admin Password on Localhost

While working locally we will be using phpMyAdmin, right? Yes ofcourse. Simply go to the phpMyAdmin control panel, for this type http://localhost/phpmyadmin/ without quotes in your browser address bar

Here you’ll be required to provide MySQL username and password, write username as “root” leave the password field empty.

Now, after login, select the related wordpress database.

reset-wordpress-admin-password-on-localhostAfter seleting the required database, you’ll be viewing a list of tables there in the selected database, find and click on the browse link near to the WordPress users table


You can see a list of entries here in your users table. The total no. of rows shows the total no. of registered users on your WordPress site.

Now, click on the Edit link next to the username of the admin user.


This will open up a form where you can edit the information stored in WordPress database for that user.

By click on the above said link, a form will be open where, you can change the already stored password in WordPress database for that particular user.

Scroll down to user_pass field and type a new password in the ‘value’ column. After putting the required values select MD5 in the ‘function’ column.

user password

click on the Go button at the bottom to save your changes.

Congratulation! You have reset the password and can login to your WordPress site on localhost using the new updated password.

Imran Chandio

The author Imran Chandio

Leave a Response