Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Reset WordPress Admin Password on Localhost

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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.

If you haven’t tried it, then see our tutorial on how to install WordPress on your Windows computer using WAMP.

Mac users can follow instructions in our tutorial on how to install WordPress locally on Mac using MAMP.

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.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

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 browser’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, then please look at our guide on how to create a WordPress admin user using your functions.php file. 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 see our guide on how to how to move WordPress from local server to live site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

64 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Hafiz Muhammad Ansar says

    Very nice blog for WordPress help. I recommend for beginners to use this platform. Thankful!

    • WPBeginner Support says

      The most common issue would be if you did not set the function to MD5 or click go to apply the changes, you would want to ensure you have done that correctly.

      Admin

  3. Joe says

    I’m encoutering this problem now after installing the 2nd WordPress on MAMP. This article is very to the point and I’ll try it tomorrow!

  4. Odineks says

    Thank you so much. I always find solutions to every of my WP problems here.
    I kept having problems with the login page on the frontend not recognizing my new password, I didn’t realize there is a function to pass that message to myPHPadmin.

  5. Jen says

    I tried this and while I was in there also attempted to change my username, which I realize was probably my mistake… but now I can’t log in at all. Is there a way to undo what I’ve done?

    • WPBeginner Support says

      You would need to follow the steps in the article and that would bring you back to where you could edit, you should also be able to use your email as an alternative

      Admin

  6. Justina says

    Your Blog is always so full of rich articles. Thanks so much. was stuck for a while because I skip the MD5 option. You are a lifesaver.

  7. Sarah says

    Thank you SO MUCH for this! You saved me so many more hours of tinkering with trying to figure out how to log in!!

  8. David says

    Thank you ever so much! Normally, I keep this stuff handy; but in this case, I did could not find where I wrote the information down.

    You saved a total re-work of a site I was planning.

  9. Vivek says

    Hi,
    When I reset My password through link then what fileds affected in Database and in which table.

    Kindly share this information i am waiting for your response.

  10. Adnan Khan says

    After half an hour of search i just found my help from this site, which solves my problem in no time,
    thanks a lot
    keep it up guys

  11. Patr says

    Hello,
    I type a new password , click continue and it does not keep the password, it shows a long string of numbers and letters. If I use this , still cannot log in. It looks simple on the video but does not work for me. Thank you.
    I looked everywhere on the internet, no solution worling.

  12. Christian Gochez says

    when I click on the Go button this error appears:

    #1881 – Operation not allowed when innodb_forced_recovery > 0

  13. Handel says

    I started to just reinstall wordpress, but then decided to do a google search, and there was GOOD OLD RELIABLE WpBeginner.com

    Thanks a million!!

  14. Icholia says

    Hello

    THANKS, Wow there is no other place that you can get well explained information like this , i have been suffering but now i just followed your tutorial and it is a game changer i love you guys and i will always learn from you guys once again thanks

  15. CJ says

    Thank you! For those who can’t make it work, remember to use the “MD5” function when changing the password. I almost skipped that part and was stuck for a few minutes.

  16. Anthony says

    Hi…
    I am so thankful for such great information you provide. I have bookmarked your site a while back.
    I have been working on a site in wordpress using xampp on the Apache local server. Just recently, I am not able to login on the admin page. I have managed to create a user name and password that works on about 95% of all sites requiring me to register. I also created a file that lists all my login info for everywhere I need to login, including the WP admin login page, IF I ever forget that info.
    I have read this page (https://www.wpbeginner.com/wp-tutorials/how-to-reset-wordpress-admin-password-on-localhost/) and watched the video, also. The only problem is that when I click on the wp_users in phpMyadmin, I get this error- ‘#1932 – Table ‘bitnami_wordpress.wp_users’ doesn’t exist in engine.’
    Am I reduced to re-installing WordPress, or is there another way around it?
    I have tried restoring my computer (using system restore) to various past restore points, but with no luck. Can you help me with this?
    I would be so thankful!!! I have put months of work into designing a site to launch, and I HAVE exported everything to a file quite a few times using WordPress import plugin (something like that).

    Could you provide a solution?

    Thank you so much…

    Anthony

Leave a Reply to WPBeginner Support Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.