How to Recover Your WordPress Password in an Emergency
Ok, your Password doesn’t work to log into your WordPress Blog.
You tried the e-mail password recovery from the Login Screen and you either didn’t get the mail or the password doesn’t work.
You tried going through the MySQL command line and making changes there and even tried Resetting your password through phpMyAdmin (both of which should only be tried by experienced users) to no avail.
You even tried to reinstall your WP installation from your Backup file (you Do have a backup right?) and still can’t get into your Administration page.
I know just how frustrating all those steps can be, I had to go through them myself and none of them worked for me either.
Then I found the emergency.php script on the village/idiot.org.
It was originally written for versions 2.2 and 2.3x of WordPress. Well, I’m here to tell you it works up to version 2.7x from my own experience.

Installation instructions
- Dowload the zip file and unzip the file
- Upload the emergency.php file to the root directory of your WordPress installation (where wp-config.php is)
- Type http:// yourblogname.com/emergency.php into your favorite browser.You get a screen that looks like the one above.
- After you are able to log into your WordPress blog, DELETE the emergency.php file from your server. You don’t want to risk someone else getting in there this way.
Last but not least, Change your password in the Users portion of the Administration page.