Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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 :)

share|improve this answer
    
:-/ 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
add comment

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

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

wp_set_password('password',1);

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

http://codex.wordpress.org/Resetting_Your_Password

share|improve this answer
    
Thanks man, this is also really good to know :) –  NATHAN C Mar 23 '13 at 17:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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