How to Reset WordPress Password on Localhost Using phpMyAdmin
Advertisements
If you’ve forgotten the password for your WordPress site on a localhost environment, you can’t simply click the “Forgot your password?” link to get a new one.
This is because a website developed in a local environment, or on your personal computer, isn’t connected to an online email server.
Therefore, any attempt to send a password reset link to your email address will fail. You won’t find any message in your inbox.
The solution is to reset your WordPress password directly through phpMyAdmin on your localhost. To resolve this issue, just follow the steps below to change your WordPress password.
Advertisements
How to Reset WordPress Password on Localhost
Since this password change is done on your local server, you don’t need an internet connection. Here’s how to reset WordPress password in a localhost environment.
- Open your browser and go to localhost/phpmyadmin/ to access the phpMyAdmin login page.
The phpMyAdmin home page.
- By default, the username is root. You don’t need to change this or enter a password. Just click Log in.
- In the database menu on the left, select the database for the WordPress site whose password you want to change.
Database in phpMyAdmin.
- In the filter box (often labeled Containing the word), type user to find the table that stores user login data.
- In the list of tables that appears, click on wp_users.
- Next, find your user account and click Edit to access its settings.
Go to the edit section for the user account.
- Find the user_pass row. In the Function column, select MD5 from the dropdown menu. Then, in the Value column, enter your new password. For this example, we’ll use ganti12345. A simple password like this is fine for a local environment. However, when your site goes live (into production), you should always use a complex password with a combination of letters, numbers, and symbols.
Select MD5 and enter your new password. MD5 (Message-Digest algorithm) is a widely used cryptographic hash function that produces a 128-bit hash value.
- Once you’ve entered the new password, scroll down and click Go.
- Wait a moment, and you’re done! You have successfully reset your forgotten WordPress password on localhost.
You will then be returned to the previous page. You might be surprised to see that the user_pass field contains a long string of characters that is different from the password you entered. This is because your password has been encrypted (or hashed).
So, to log back in, use the password you just set (in our case, ganti12345), not the encrypted string from the database.
Test Your New WordPress Password
To confirm that changing your password via phpMyAdmin was successful, follow these steps:
Also Read:
- Visit your WordPress login page on localhost (e.g., localhost/your-site/wp-login.php). Enter your username and the new password you just created. Then click Log In. Make sure your username is correct.
- That’s it! You should now be logged into your WordPress dashboard on localhost.
This tutorial has shown you how to reset WordPress password on localhost using phpMyAdmin. Now you can continue developing your website without interruption.
You can install WooCommerce on WordPress to build your own online store. This free plugin provides all the essential features needed for a marketplace.
By having your own e-commerce website, you not only make selling easier but also gain valuable customer data that can help you make better business decisions.
However, managing a website on your own can sometimes be overwhelming, distracting you from your core business focus. By partnering with the Tonjoo Team for your Content Management System (CMS), you no longer have to worry about the technical details.
We have extensive experience managing websites for both local and multinational clients, such as Astra International and Hipwee. Let’s discuss your website needs, get in touch with Tonjoo today!
For more articles on WordPress, WooCommerce, and web development, check out Tonjoo Studio Blog by Moch. Nasikhun Amin.
Last Updated on July 5, 2025 by Moch. Nasikhun Amin
Advertisements