Lost WordPress Admin Password and Email? How to get back into your weblog…

What should you do if you’ve forgotten or lost your WordPress Admin password?

Step one of course would be to fill in your username and your email into the lost password form.

But what if you don’t know one of either your username or your email?

Are you out of luck?

Not if you have admin access to your server.

First things first.

  1. login to your server admin account (cPanel, Hsphere, Plesk, etc…)
  2. open up PHP MyAdmin (see your host’s help file)
  3. open up your WordPress weblog database
  4. don’t panic when you see the complicated screen
  5. click on wp_users in the left hand column
  6. choose browse from the top menu
  7. you will see all your users with usernames and passwords
  8. go back to the login screen
  9. request a new password
  10. if necessary modify the email to one which will come to you

If you want to make your life miserable you can replace the hash key instead and login directly. But why bother when you can just go back to using the standard interface.

I’m sure I’ve saved at least one person a call to his or her server admin with this info.

Enjoy posting in your newly recovered WordPress weblog!

This entry was posted in WordPress and tagged , , , . Bookmark the permalink.

78 Responses to Lost WordPress Admin Password and Email? How to get back into your weblog…

  1. Sidi Ethmane

    Thanks man you just helped me, btw i wondered why my wordpress doesn’t want to send the password to my email and it send it to my gmail account ?

  2. I guess that’s because you must have used Gmail id in your profile rather than your other email. WordPress always sends to email mentioned in your profile.

  3. Hi Alec,

    I just tried above “steps”, but I could not make it work?!

    I made it till step no. 7, but when I go back and request a new password it just sends the same password and activation key (which doesn’t work) to my email.

    You can try it yourself if you want: http://www.bodyfitdk.dk/wp-login.php?action=rp&key=61e1b96b

    Can I just edit the password for the user via the PHP MyAdmin?

    Best regards


  4. Thanks Rohit, you’re absolutely right.

    Hello Claus,

    Yes, you can edit the password for the user via PHP Admin but you have to edit it as a hash key. I’ve linked to instructions above.

    Good luck!

    PS. There seems to be something wrong with your WordPress install as these instructions should work without having to edit the password directly.

  5. Fred


    I hope your info will help.

    I’m using WP, hosted on Godaddy.

    If I understand correctly, I can log into my Godaddy account and fix this – correct?


  6. Hi Fred,

    If you have PHP MyAdmin over at GoDaddy, yes. I don’t have GoDaddy hosting and from my frustrating experiences administering domains at GoDaddy don’t plan to (ads and popups all over the place). It’s quite possible that you don’t have an easy way to administer your database at GoDaddy.

    But I’m hoping for the best for you. Good luck.

  7. Odile Brock

    I lost my WordPress password and the email account I used no longer exists. I’d like to follow your instructions, but I don’t even understand step 1. What’s a server admin account? I never saw the names cPanel, Hsphere, Plesk… Sorry for being such a nongeek. Is there still hope?

  8. Lawrie from Ozz

    Thanks mate your a life saver, well time saver.

    Anyway your advice worked.


  9. Glad it helped Lawrie.

    Odile, I’m sorry but this technique requires a basic knowledge of how to administer a web hosting account. If you are still having issues, you could send a link to this article to your server help desk and ask them to follow the steps for you.

    Depending on your hosting company, they will do this for you or not. I recommend Cartika as they do help with admin when you need it.

  10. Kevin McNeese

    Thank you for this post! Worked like a charm and I’m back to blogging.

  11. Odile

    Thanks, everyone, I did write to the server and they sent me a new password.


  12. Great advice, thanks! You just saved me a lot of time and frustration with this post!

  13. doug

    How about if I have a blog that is for now only local (mail not configured) – then what?

  14. Hello Doug,

    Replace the hash key and log in directly. Instructions linked above. I’d be surprised if your local weblog can’t mail but I suppose it depends on configuration.

  15. Mike

    Great Tip.
    Saved me a lot of time.

  16. Thanks Man.

    It worked for me.

    Wish you luck !

  17. Thanks for this! I was trying to get into a neglected site and for the life of me I couldn’t remember my username or password. Just opening PHP MyAdmin and seeing the username tripped the memory locks and I remembered the password!

  18. Hello Patty,

    That’s wonderful that you were able to remember. Learning the basics of phpAdmin can be a great help as a webmaster.

  19. thank you thank you thank you..!!!!!

    hey man,….thanks for saving me another five hours of stress this afternoon….

    pages like this make me believe in the goodness of people…

    little bits of knowledge that help for free….


  20. Elizabeth

    Help! I have followed the instructions above and changed the email address to another one in hopes of getting the password emailed to me. I went back requested a new password and waited. No email.

    I should mention that I can get the password reset emails from WordPress but when I clicked the link to reset the password, I am taken to the WordPress Log-in screen but a little red box appears and say “Sorry, that key does not appear to be valid”. So, I can’t reset the password. I have reset it successfully in the past. Any ideas for me?

  21. Hello Elizabeth,

    That is very strange.

    If you ever figure out why you can’t login with the mailed out key, please let us know. It’s almost as if you have two versions of WordPress running mixed up (which use different key systems).

    Good luck!

  22. Pingback: links for 2009-03-03 « Where Is All This Leading To?

  23. Friendster

    Thanks. It’s really easy to use the lost password interface but my problem is the reset link can’t get though because it won’t recognize the key. I still can’t reset the password.

  24. Erica

    Thank you so much for writing this. I had this exact situation and was just about to uninstall wordpress and re-install it before I read this. You are a life saver!


  25. Thanks all I had to do was check in phpmyadmin and look for the email that the password was sent to , worked like a charm .

  26. All i can say is life saving SPOT ON!

  27. Andre

    Thank you very much for your clear and concise intructions. You are a star!

  28. JJ

    Didn’t work for me either. Installation on Ubuntu, no e-mail configured. Changing password in phpmyadmin didn’t work either. I guess a reinstall is required?

    The link above just goes to Main Page, am I missing something?

  29. Hi JJ,

    Next time, include an email when setting up an admin account.

    For the reinstall just backup your WP Content first. You should be able to move everything except the users table across from your existing database.

    Sorry about the incorrect link in the Codex. I think it must have been changed.

    Let us know if you figure out what was wrong and are able to get back in.

  30. thank you so much .. I set up a wordpress installation for someone else and didn’t change the password because I wanted to let the other person choose the password. You can imagine how stupid I felt when i couldn’t find the standart password anywhere ..

    you really helped me out.

  31. Anna

    Thank you very much for this, it saved me from trying to contact my webhost over Christmas!

    Anna, it seems the site in your URL field doesn’t even run WordPress.

    Happy New Year anyway.


  32. Ivan


    Thank you a lot this has really helped me at the first attempt.

    Wish you a good new year.


  33. Your explanation of how to get pw back from wordpress saved my life. Thank you for being so clear…and for sharing this info. –kbmhartnett

  34. Thank you so much for posting this! You saved me from having to delete and reinstall my blog.

  35. Hi there,

    In my phpMyadmin, i see that the wp_users table is empty.

    What can i do now?

    Thank you

  36. Hi Andrew,

    You can add a user. You won’t have the password though, so you’ll have to do a password reset from the login window using that user’s username and picking up the password from the email.

    Have fun!

  37. Rebecca

    Thank you for this!! I was really starting to panic and this was SUCH a huge help.

  38. Matt

    Didn’t work for my wordpress account. I only see this as the only option. Wont send pw to my email. Confused and helpless.

    Can anyone help?

  39. Hello Matt,

    This is not for WordPress.com, this is for stand alone WordPress installs.

    Good luck!

  40. BLS

    Thanks so much you saved me from my disorganization!

  41. Terri

    I just wanted to give you a huge thank you. I had someone else do an installation on one of my sites and could not for the life of me figure out what username they had used. Took a little snooping around but finally figured out thanks to you what username I needed to use. Great job!!!!

  42. michael

    thank YOU!!!!!

  43. Vaidas Surblys


    I didn’t changed my pasword and login. I don’t know why but I can not log in. I made all your steps. I can see my password, login, but I can’t log in…what is the problem and how I can fix it?
    Can I try to change my pasword, logn and email?
    Thank you for your answer!

  44. Hi Vaidas,

    I’d suggest following our instructions in the post above.


  45. Onfaisal

    Many thanks..after readomg your article i have found easy way to get my password back. I have read some articles to recover my password but they all are complited, using md5encryption. Thank a lot to give simple way.

  46. kritika

    hi…actulay i dnt remember my word press admin password…have no user access to my word pree…have tried cliking on lost your password bt on typing email address, i get the msg “The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function…”

  47. Sam

    Thank you, thank you!

  48. Syed

    Thanks for sharing. It solved my problem to recover lost username and password and also edit my user name within the myPHP admin. I have godaddy hosting.

  49. Ah I was about to be in freakout mode! Thank you so much for this it helped find which email I used for login.

  50. thank you, thank you thank you! Had an old email address so could not get it reset. Changed it as you suggested. Someone messed with my site, sigh.

  51. Mano Rame

    Great time-saving info. Saw the hashkey conversion method on another blog but this is simpler.

  52. Suzanne

    Thank you for the extremely simple instructions with php myadmin, and telling me not to panic. After I got to PHP MyAdmin and clicked on wp-users, I was able to see my ID, but not the password. I saw the edit that was on the same row as the user ID and password, and was able to update the e-mail address very easily using edit.

    Then I went back to the lost password on the WP log in screen, and it e-mailed me a link to change my password.

    I did the same for my blog on my sub-domain. Also, I think that was better if my hard drive ever crashes again. At least I know I will have the correct e-mail address for my wp account.

    I would have went nuts trying to follow the instructions on the wordpress forums even with the pictures.

    Live and learn, make a back up of everything including bookmarks and passwords.

  53. Joanna Lingham

    Thank you so much for this. You’ve saved me such a lot of time and stress. Your help is greatly appreciated! Jo xx

  54. I’ve got a really stupid question. I’m pretty sure I can remember my wp-org username and password, but I can’t for the life of me remember how to get to the screen where I have to input them!

    I’ve a self-hosted site that currently has just a holding page on it. [mydomain].com takes me to the site. how do I get to the login screen?

    Have tried [mydomain].com/admin, [mydomain.com/[myusername], and various other possibilities.

    Told you it was stupid.

  55. Prasad

    Hi , I have found two more ways to recover your password.


    Start by Logging Into cPanel
    1) Go to cPanel homepage, then select the database of the site that site. Then locate the line wp_users file and edit it.
    2) This will open up a new window where you will find a list of usernames with passwords (encoded) On the line with the user name and password you lost, click and edit
    3) You will then get a screen with the data for this user including the encoded password. Delete the encoded password and enter an new password in ASCII format- Then go and click “GO”
    4) log to your WordPress site with new Username and Password

    FTP and PHP hard reset

    1) log to your FTP Details
    2) Go to Your Theme Folder
    3) put following Code on functions.php file

    < ?php
    wp_set_password(‘password’,'username’); ?>
    < ?php
    if ( function_exists(‘register_sidebar’) )
    ‘before_widget’ => ‘
  56. ’, ‘after_widget’ => ‘
  57. ’, ‘before_title’ => ‘

    ’, ‘after_title’ => ‘

    ’, )); ?>

    in above code at Username put your Username same with Password .Now log to your site with this Username and Password.

  58. Karim

    Thanks a lot, I just used it.. Works Works Works..
    you saved my day..

  59. Jamie

    Thank you VERY much. You saved me a lot of time.

  60. Jean

    Thanks you really helped me

  61. nicola renovich

    This looks hopeful but no joy yet! can’t seem to log in to my wordpress site which I created 4 months ago..not even recognizing my email let alone user and password! got into cpanel of uk2 (host) and can find wp user but not users..have looked in all wordpress files I could find and couldn’t see passwords or usernames anywhere..can you help?

  62. nicola renovich

    update..I’ve done it!!!!!! thank you! took me 5 hrs of stress before I hit this page..thank you!

  63. Wolfgang

    ‘Am more than happy to report that 5 years after your original post, you’re still saving people’s butt and stress levels. Mine included. Thanks Alec !

  64. Julie

    I have copied one site from a domain to another
    and then i could not log in in the new wp-admin. I tried all tricks you have provided above but none works.

    Sould the usersname and password stay the same as in the old location. I am really puzzled. :(

    Someone can help?


  65. Ndugu

    Quickly i just wanna thank you Alec for this great post. A few years down the road and this post is very useful. I just followed what your instructions of this post today and it did work for me. Many thanks Alec.

  66. Hi Ndugu,

    Glad the system worked for you! Thanks for letting us know.

    Hi Julie,

    I suggest you get in via the database. If you are still having issues, we can help. Please sign up for a pro support incident.


  67. Mahtab

    Many many thanks.

  68. John H

    As listed above so many times- you are a life saver. Thanks for the right info at the right time!

  69. Cecilia chapman


    This made it easy for me to recover the lost data and get access again. Turns out I’d deleted an email address that the reset password went to.

    All sorted now. Thanks very much!
    Cecilia :)

  70. chris

    Perfect thanks very much.

  71. Alicia Awai

    PRASAD….thank you thank you thank you…finally got it after 5 days loll

  72. Maji

    I’m stuck at step 7..help!

  73. Drew Andersen

    Thank you! This was exactly what I needed!

  74. Lorelle

    you’re a lifesaver! Thanks man!

  75. Yay! Thank you SO much. Years on and this still works. I was ready to delete and start again. Got a little stalled at step 7 because there were 3 wp choices for me. Hours of frustration and a very bad temper now cleared! Thanks again Alec!

  76. Wow great help!! I was almost in panic because I did not know how to recover my password, but your information really helped me!


  77. hello..actually i have forgotten my admin password and username of my offline website that i am preparing for my final year project by using php wordpress..so please tell me the steps to find my admin password and username and also i am using eclipse platform.

  78. testuser

    Why always doing it difficut eh.
    As long ppl have access to their db through phpMyAdmin it is done in 10 seconds if you know how to.

    #Access your db (phpMyAdmin). serach for wp_users (or the right prefix if you use another one (smart ppl would do)).
    #Select the one with user ID 1. (if you went for admin)
    #Click edit and change password in whatever.
    #You see the column in front of it (function)? Select MD5
    #Click Go

    Not sure if I am right? Test if yourself.

  79. Thanks lifesaver, you should have a donate button on this page – you potentially save us money from recovering and paying others to do this for us

Leave a Reply