WordPress

How to Reset WordPress Admin Password on Localhost

How to Reset WordPress Admin Password on Localhost

Recently, one of our users asked us how to reset WordPress admin password on localhost? If you are running WordPress on localhost and forget your password, then you can’t reset it by email. In this article, we will show you how to reset WordPress admin password on localhost.

How to reset WordPress admin password on localhost

Why Password Reset Doesn’t Work on Localhost?

The term localhost is used to describe a local server that is not available to the general public. For example: your personal computer.

Many WordPress users install WordPress on localhost (in their computer) to test changes, design websites, try out new plugins, and even learn WordPress.

Now here is the problem that some beginners may come across.

If you forget your WordPress admin password while working on localhost, then you will be NOT be able to reset it using the normal password reset option in WordPress.

The password reset option emails you a link to reset your WordPress password. In order to send emails, your server needs to enable the mail function.

This function is turned off by default on local servers which means WordPress will not be able to send the password reset email.

But don’t worry, there’s a way to reset your WordPress password on localhost.

Ready? Let’s get started.

Reset WordPress Admin Password on Localhost

We will be using phpMyAdmin to reset password on localhost. Simply visit phpMyAdmin control panel by typing this URL in your rowser’s address bar:

http://localhost/phpmyadmin/

You will be asked to provide your MySQL username and password. Typically, the username is root with no password.

Once you are logged in, you need to select your WordPress database.

Select database

Once you select your database, you will see a list of tables in your WordPress database. Go ahead and click on the browse link next to WordPress users table.

Users table in WordPress database

You will now see the list of entries in your users table. The number of rows depend on how many users are registered on your WordPress site.

Next, you need to click on the Edit link next to the username of the admin user.

Browsing users table in WordPress DB

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

Changing user password

Scroll down to user_pass field and type a new password in the ‘value’ column. After that you need to select MD5 in the ‘function’ column.

Don’t forget to click on the Go button at the bottom to save your changes.

That’s all, you can now login to your WordPress site on localhost using the new password.

If for some reason you’re having a hard time following the phpMyAdmin method, Simply open your theme’s functions.php file and paste the code in the article above, and you’ll be good to go.

We hope this article, helped you learn how to reset WordPress admin password on localhost. You may also want to take a look at How to Add Web Push Notification to Your WordPress Site, or How to Create a Custom Facebook Feed in WordPress.

If you liked this article, then please find us on Twitter and Google+.

Now is the time you start getting more online