I have been trying to reset my admin password for my local install of wordpress running on MAMP. Previously had been working fine but I forgot the password but when I go through the process of 'Lost your password' I am meant to get an email with new password but it never arrives in my hotmail (also checked the junk) I know these can sometimes take a while to come through but it has been a day now.. Any ideas I could try?



Probably you dont have any mail server installed/enabled (like sendmail/qmail/postfix) in your local machine. You can still reset your admin password from database. The table "wp_users" stores the password in the "user_pass" field

You can just replace the value with a md5 hash value of your desired password for the admin user.

Note: This is good for test/local environments and dont do so in Production server because it invalidates the effect of salt :)

  • :-/ strange I tried changing it to MD5 function and changing the password in phpmyadmin a couple of times and it is still saying my password is wrong :-/
    – NATHAN C
    Mar 23 '13 at 17:29
  • Sorry my bad, was using wrong database lol. Useful info especially about the effect on salt thanks :)
    – NATHAN C
    Mar 23 '13 at 17:33

You can reset the password via code also. Below are the steps:

Paste the below code in your active theme's functions.php file.


Put in your own new password for the main admin user. The "1" is the user ID number in the wp_users table.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.