Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How To Reset Your WordPress Password Using phpMyAdmin

Last updated on:
  1. 1. Currently Reading: How To Reset Your WordPress Password Using phpMyAdmin
  2. 2. How to Reset WordPress Password with MySQL

One of the primary reasons why companies like LastPass thrive is that we humans aren’t designed to remember random combinations of alphanumeric characters – which are essentially strong passwords. What happens if you’ve setup a client’s WordPress site, customized the theme, installed the plugins, added the content – everything in one go and then go out for a beer – all the while, forgetting what password you set for the default user? Next morning, you’re finalizing the project and when you’re about to type the password, it dawns upon you – you have no freaking idea what it is!

In kill-me-now moments like these, there’s a quick healing potion. That’s what this post is all about.

I’m going to divide WordPress password recovery into two parts:

(a) recovering it using phpMyAdmin (if you’re on localhost using WAMP/XAMPP/MAMP)

(b) recovering the password using MySQL (if phpMyAdmin isn’t installed on your server. Part (b) will be present in the next post in this series.

Resetting Your WordPress Admin Password Using phpMyAdmin

First off, it’s launching phpMyAdmin that’s the tricky part. If you’re using WAMP or its variants, simply click on the icon on the taskbar and select phpMyAdmin as shown below:

phpMyAdmin from WAMP

If you’re on a shared hosting plan and have cPanel, login to cPanel and select phpMyAdmin found under Databases.

phpMyAdmin from cPanel

Once you’re inside phpMyAdmin, select the database that you’re using for your WordPress installation. In our tutorial, let us assume the database to be genesis_wp.

Select Database from phpMyAdmin 2

Look for a table entry called wp_users and select it. In most scenarios this should be the case. However, if you’re a security enthusiast, then you might have used a different prefix during the WordPress installation. The default prefix is wp_ hence the table entry wp_users. However, if your prefix was say ptbktwp_ then your user table entry would be ptbktwp_users.

The following two tables will help you understand:

Using the default prefix i.e. '_wp'

Using the default prefix i.e. ‘_wp’

Using a custom prefix: 'ptbktwp_'

Using a custom prefix: ‘ptbktwp_’

For simplicity, let us consider the default prefix – wp_users. Once the table is loaded, look for the username you had chosen while installing WordPress. In this tutorial I’m assuming it’s the default username – admin. Click on the little yellow pencil icon located next to the admin entry – that’s the edit icon.

Edit password under wp_users in phpMyAdmin

Look for the row named user_pass (usually the 3rd one) and make the following changes:

Reset WordPress Password in phpMyAdmin

  1. Under the Function field, set it to MD5.
  2. Under the Value field, enter your new password – let’s say mikerotch.
  3. Click on Save Changes.

Save Changes

Now you have successfully changed your WordPress password to mikerotch.

Settings changed

Awesome, now you’ve reset the WordPress admin password.
And, you owe me a beer. 😉

Reset Your WordPress Password Video Guide

I’ve prepared a video tutorial of the entire process. Hope you like it and would love to hear from you!

Have you ever been in a crazy forgotten password situation before? Let us know!

reset-wordpress-password
Article by Sourav WPExplorer.com guest author
Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

42 Comments

  1. Moogle Stiltzkin (@mooglestiltzkin)

    thank you Mr Sourav K. Your excellent pictorial guide saved me big time. I had done all that except change the type to md5. Your guide helped me alot, thx again and kudos :} *respect

    • Reg Lee

      Hi Mr Sourav K, I have tried your instructions as above to reset the admin password. However I am still met with the error message that “Invalid username or incorrect password” when I try to log in with the updated password. Please can you give me some help on what else I should look out for?

    • Timi Pudie

      Honestly, If I could, I would have actually bought you that beer right now.. You are a life saver

      • Jimmy Malecki

        I thought the same thing. You’re great at making it easy with a bit of fun. Thanks!

  2. Ahmad

    thank you so much.

  3. Srini

    You are awesome!!
    you have helped me solving it which i was trying hard on for half a day!!
    cool

  4. Hassan

    Its really helpful for me, thank you very much for this superb step by step guide to change the localhost wordpress password.

  5. Ola

    you really are awesome and a perfect tutor

  6. Thea Webster

    Thanks, worked out perfectly.

  7. Veronica

    Yay thanks! I normally use that emergency script, but seeing as FTP is also giving my problems this really helped.

  8. Ashri

    It took awhile for me to figure it out due to slightlydifferent format and finding some passwords… but.. I FOUND IT! THANKS LOTS!!!! =)

  9. zamaan

    helped thank you!!

  10. News World Inside

    Pretty good instruction, specially the added video help a lot to do it for the beginner. Thanks

  11. Deva

    Thank you!!!

  12. matias*berra

    Thank you man! lets just say you have saved me a lot of trouble today 🙂

  13. Elcot Creative

    Brilliant 🙂 🙂

  14. Chris

    I owe you 24 cans of beer!!!!

    • AJ Clarke

      Nice, we’ll send over our address to your email 😉

  15. Onwukwe Peter Omoke

    Am so happy, it worked.

  16. PharmacyMBA

    This tutorial is a lifesaver. I was able to recover my admin email using this method. I didnt have to use the method to change the password

  17. Luciana Cury

    Thank you!!

  18. Max

    All I can say is…. Thanks a Million! Phew!

  19. Gilmar Aleixo

    Tks a lot, Sourav!

  20. Smriti Techno Logics

    Thanks sir, Nice its working..

  21. adeemj

    Great tutorial Saurav. Keep them coming – they are very informative and helpful especially to the newbies and even some seasoned bloggers.

    I won’t say that I know everything there is to know, but I like making new discoveries so I am constantly back stage going through my dashboard. It is by doing that I learned how to change admin name and even of late did a password reset. Everything comes with practice.

    Thanks for sharing… Have a great day….

  22. harrocarram

    Duuuuuude.
    You rock.
    Lekker!

    If we ever meet, a beer it is.

  23. Alan

    Nice one!!! Saved me losing my mind

  24. Francisco J Gallardo Popp

    Even easier, change the mail to one you’ve access, and then proceed with recover form…

  25. aditya bisht

    Hey thnx sir I don’t know how to change wordpress password now I can change my self thnx sir .??

  26. Beata

    Thx man! You save my life! 🙂

  27. ASR

    Hi,
    I tried this tutorial but I am still getting the error. Every procedure and step is correct. Why is that?
    Please help me.

    • AJ Clarke

      You may want to contact your webhost for some assistance or hire a professional developer. There isn’t any reason you would still get an error if you modified the password via the database.

  28. Barry Edwards

    This was a very handy quick fix after my multi site migration. Very clear. Thanks.

  29. jagmohan singh negi

    i just tried to reset password via phpMyAdmin and its working.thanks for your valuable information.

  30. shaynel ahmed

    absolutely a lifesaver!!! I am not very IT proficient – if I can do it – ANYONE can – i owe you a CRATE full of beers!!!

  31. taucan62

    wp users is missing

  32. birthdayhdcard

    Actually, I want to know that how can i know what is password. I have forget my password but I had saved my password in my browser so now when i put url of my wp-admin it automatically login. But I have forget my pass so how may i know my current password

  33. Intaj Mondal

    Phpmyadmin is simple and works fine.

  34. ehsan

    thanks its realy work

  35. Chahat Bajwa

    thank you so much sir. Your article saved my website. Very well article and the explanation is awesome. thanks once again sir.

  36. jazanne

    You da real MVP

  37. Nalini PhD Msis

    Good fix. Thanks a ton.

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.