I’ve had clients lose their WordPress blog password before, but they have been able to use the WordPress ‘lost password’ form to have a link sent to their email where they can then reset it.
Recently, though, I had a client who took control of a business page that was created in WordPress and the login and password information that they provided was not working. The client knew very little about the site, only that a previous developer had set it up and was able to get in and make changes.
After trying all combinations of information they sent, as well as attempting the password reset method from the WordPress login screen, I turned to the internet for help. I was able to find a handy script called emergency.php that solved my problem.
Some advanced FTP knowledge required
The instructions are posted on Village-Idiot.org, as well as the link to download the file. (Scroll to the bottom of the article on the Village-Idiot page and you will find the download link, or click here to download the file.) In order to install the script and successfully reset the password, you will need to at least know the correct user name for the blog. Usually, this is simply ‘admin’. You will also need enough knowledge to access the blog files via FTP so you can upload the emergency.php file to the blog directory*. (See info at end of this article for more info.)
Once the emergency.php file is uploaded to your blog directory, open a web browser (Internet Explorer, Firefox, Chrome, etc.) and type in www.YourDomainName.com/emergency.php. A text page will appear with a place for you to enter your user name and desired password.
Confirmation if password reset was successful.
If your user name is incorrect, you will get a message saying so. I recommend you try admin if the user name you think is right isn’t working. When the script is successful, you will get a confirmation message. Write down the new password you selected, and BE SURE TO DELETE THE EMERGENCY.PHP FILE YOU UPLOADED.
Return to your wp-admin WordPress control panel and use the password that you just set. You should be good to go!
Many thanks to Village-Idiot.org for providing such a useful script. It certainly came in handy for my client.
Download the zip file: emergency.php
Specific Instructions from Village-Idiot.org website:
- Unpack the zip.
- Upload emergency.php to the root of your WordPress install (the same directory that contains wp-config.php)
- Open http://www.yourdomain.com/emergency.php in your favorite browser.
- Follow the simple instructions.
- When you are done, delete emergency.php off your server. Do not leave it up for someone else to come along and use.
*additional FTP upload information:
I use Windows Explorer to upload files via FTP because the screen available by right-mouse-clicking on the Windows START button and choosing ‘Open Windows Explorer’ or ‘explore’ depending on what version of Windows you are running. Once the Explorer window is open, clear out any text that is in the address bar and type: ftp://yourDomainName.com. (Use YOUR actual domain name, not what I typed!) Press Enter.
You should see a login box pop up where you can enter your hosting username and password. This is NOT the same as your WordPress username and password. The hosting login info would have been created when you set up your hosting account.