WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Reset WordPress Admin Password on Localhost

How to Reset WordPress Admin Password on Localhost

Last updated on November 21st, 2016 by Editorial Staff
175 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
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.

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.

175 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

52 Comments

Leave a Reply
  1. Joe says:
    Feb 23, 2021 at 3:03 pm

    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!

    Reply
    • WPBeginner Support says:
      Feb 24, 2021 at 9:21 am

      We hope the guide helps :)

      Reply
  2. Gerron says:
    Nov 24, 2020 at 5:01 am

    Solid solid info right here, thanks a lot, really helped, so simple

    Reply
    • WPBeginner Support says:
      Nov 24, 2020 at 10:41 am

      Glad our guide was helpful :)

      Reply
  3. Odineks says:
    Oct 28, 2020 at 9:38 pm

    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.

    Reply
    • WPBeginner Support says:
      Oct 30, 2020 at 9:52 am

      Glad our guide was helpful :)

      Reply
  4. naved ahmed says:
    Oct 14, 2020 at 1:00 am

    Thanks a lot. Finally problem solved within a minute.

    Reply
    • WPBeginner Support says:
      Oct 14, 2020 at 10:24 am

      Glad our guide was helpful :)

      Reply
  5. Mohsin says:
    Jun 11, 2020 at 4:54 am

    I just love this
    Love the way you write every thing

    Reply
    • WPBeginner Support says:
      Jun 11, 2020 at 8:57 am

      Thank you, glad you like our content :)

      Reply
  6. Jen says:
    May 29, 2020 at 1:06 pm

    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?

    Reply
    • WPBeginner Support says:
      Jun 1, 2020 at 1:38 pm

      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

      Reply
  7. Justina says:
    May 28, 2020 at 10:50 am

    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.

    Reply
    • WPBeginner Support says:
      May 29, 2020 at 8:43 am

      Glad our guide could be helpful :)

      Reply
  8. Sarah says:
    Apr 11, 2020 at 1:32 pm

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

    Reply
    • WPBeginner Support says:
      Apr 14, 2020 at 11:33 am

      Glad we were able to help :)

      Reply
  9. David says:
    Jan 15, 2020 at 3:48 pm

    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.

    Reply
    • WPBeginner Support says:
      Jan 16, 2020 at 8:28 am

      Glad our guide could be helpful :)

      Reply
  10. adeel kamran says:
    Oct 31, 2019 at 2:23 pm

    You saved me, I had a lot of work there.

    Reply
    • WPBeginner Support says:
      Nov 1, 2019 at 9:48 am

      Glad our guide could help :)

      Reply
  11. lokesh n says:
    Oct 25, 2019 at 12:22 pm

    thank you it’s really working thank you

    Reply
    • WPBeginner Support says:
      Oct 28, 2019 at 11:19 am

      You’re welcome glad our article was helpful :)

      Reply
  12. Vivek says:
    Apr 26, 2019 at 8:14 am

    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.

    Reply
    • WPBeginner Support says:
      Apr 26, 2019 at 11:08 am

      For understanding the database you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/ :)

      Reply
  13. Adnan Khan says:
    Apr 17, 2019 at 2:21 am

    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

    Reply
    • WPBeginner Support says:
      Apr 17, 2019 at 11:21 am

      You’re welcome, glad our guides can be helpful :)

      Reply
  14. Tenasu Mensah says:
    Jan 23, 2019 at 11:53 am

    thanks a lot, kudos to you guys keep the good work doing,you guys are doing great job

    Reply
    • WPBeginner Support says:
      Jan 23, 2019 at 1:58 pm

      Glad our guide could help :)

      Reply
  15. Anuj says:
    Oct 1, 2018 at 1:40 am

    It work fine, Thanku so much,

    Reply
  16. Pádraig says:
    Sep 27, 2018 at 9:47 am

    Really simple and great explanation.

    Many thanks for sharing.

    Reply
  17. Saranya says:
    May 3, 2018 at 12:44 am

    Works Good! Thanks a lot.

    Reply
  18. Patr says:
    Apr 29, 2018 at 10:32 am

    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.

    Reply
    • Jason says:
      Nov 27, 2018 at 9:29 am

      Same problem here. Did you find a solution? Is there any chance of being hacked?

      Reply
  19. Christian Gochez says:
    Apr 12, 2018 at 1:23 pm

    when I click on the Go button this error appears:

    #1881 – Operation not allowed when innodb_forced_recovery > 0

    Reply
  20. Edward says:
    Apr 9, 2018 at 10:05 am

    Simple and neat! worked thanks

    Reply
  21. Handel says:
    Mar 18, 2018 at 11:08 am

    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!!

    Reply
  22. Sheriff says:
    Jan 18, 2018 at 8:25 am

    very effective… kudos

    Reply
  23. Icholia says:
    Jan 17, 2018 at 8:53 am

    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

    Reply
  24. CJ says:
    Sep 28, 2017 at 5:09 pm

    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.

    Reply
  25. mohamad hossein says:
    Sep 19, 2017 at 5:24 am

    so use full thank you so much

    Reply
  26. Janet says:
    Sep 16, 2017 at 1:49 am

    I got completely lost on the video so I tried plugging in the URL. Doesn’t work. Still lost.

    Reply
  27. Ma says:
    Sep 13, 2017 at 9:55 pm

    Thanks so much, you saved me from what could have been a very embarrassing situation!

    Reply
  28. James says:
    Apr 21, 2017 at 1:25 am

    I change the password, username, userlogin and nickname not I cant login. Any advice?

    Reply
    • suganya says:
      Mar 13, 2018 at 12:56 am

      i can’t able to login .because it’s shows me like email is not registered .so what can i do???

      Reply
  29. Jac says:
    Mar 27, 2017 at 3:33 am

    Thanks so much for providing this info – I was really stuck!

    Reply
  30. Gerhard SCHNEIBEL says:
    Mar 24, 2017 at 4:30 pm

    Thanks a lot for your help. I am very happy with “wpbeginners”.

    Reply
  31. Renu says:
    Feb 19, 2017 at 8:03 am

    it worked.. thanks a ton..

    Reply
  32. Anthony says:
    Feb 9, 2017 at 1:10 pm

    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

    Reply
    • WPBeginner Support says:
      Feb 9, 2017 at 8:31 pm

      Hi Anthony,

      you can also add an admin user by adding code to your current WordPress theme’s admin file.

      Reply
  33. Kakaire Charles says:
    Jan 8, 2017 at 7:55 am

    Extremely wonderful. Thank you for sharing.

    Reply
  34. Gaurav says:
    Jan 7, 2017 at 12:27 am

    i tried this but not working

    Reply
  35. shaikh muneer says:
    Oct 24, 2016 at 9:01 am

    super way to reset admin password thank you for share this

    Reply

Leave a Reply 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.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
SeedProd Logo
SeedProd
Create beautiful custom landing pages - Drag & drop builder. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
ProfilePress
ProfilePress Coupon
Get 20% OFF on ProfilePress WordPress ultimate user and profile plugin.
SendinBlue Coupon Code
Sendinblue Coupon
Get Sendinblue, a powerful marketing automation toolkit for small businesses, for FREE.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.