Resetting your WordPress Admin Password
Written by Tim SissonIf you have ever lost of forgot your password to your WordPress dashboard, it can be very fustrating. If you find yourself in this situation, there are a few solutions you can use to reset your password.
Changing your Password through FTP
This is an easy way to reset your Admin users password if you have FTP access.
- Login to your website via FTP. If you are unfamiliar FTP please see our article. Navigate to your theme's functions.php file and downlaod it to your local computer.
- Edit the file and add this code to it, at the beginning, after the first <?php:
- Upload the modified file back to your website.
- Then log into your WordPress dashboard with your new password. After you login it is imperative you remove the code and update your password. If you do not remove the code you will reset your password everytime the page is loaded.
wp_set_password('password',1);
Changing your password using phpMyAdmin
If you are not comfortable working in your database environment, we advise that you not use this method. Always make sure you keep a backup prior to performing modifications to your database.
- Begin by clicking on the icon for phpMyAdmin from within cPanel.
- A list of databases will appear. Click on your WordPress database.
- All the tables in your database will appear. Look for the wp_users table.
- Click on the icon for browse.
- Locate you Username under the user_login field.
- Click Edit
- Your user_id will be shown, click Edit
- Next to the user_pass is a long list of numbers and letters.
- Select and delete these and type in your new password. Remember it is case sensitive.
- Once you have done that, click on the dropdown menu for the "function" field and select MD5 from the menu
- Verify that your password is correct, and that MD5 is in the field.
- Click "Go"
- Go to your WordPress dashboard and verify your new password works.
Using the Emergency Password Reset Script
If other solutions did not work, then you may wish to try using the Emergency Password Reset Script. It is not a plugin but rather a PHP script.
Important Notes
- Using this script requires you know the admin username.
- The script updates the admin password and sends an email to the admin's email address.
- If you do not get the email sent, the password is still changed.
- The script is to be placed at the root of your WordPress installation.
- Removing the script when finished is extremely important for security reasons.
Directions to use the script
- Copy the emergency script from Emergency Password Script and put it into a file called emergency.php in the root of your WordPress installation (the same directory that contains thhe wp-config.php file)
- Visit the script is your web browser. (http://yourdomain.com/emergency.php)Dont forget to replace yourdomain.com with your actual domain and adjust the path if WordPress is not installed on the root of your domain.
- Follow the on screen instructions, enter in the admin username (typically admin) and the new password, then click Update options.
- Delete the emergency.php file from the server when you are done. Leaving this script on your account is a security risk as someone else could use it to change your password.
If you need further assistance please feel free to contact our support department.
Like this Article?
Tweet
Latest Questions
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Recent QuestionsNeed more Help?
Search
Ask the Community!
Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.
Current Customers
| Chat: | Click to Chat Now | E-mail: | support@InMotionHosting.com |
|---|---|---|---|
| Call: | 888-321-HOST (4678) | Ticket: | Submit a Support Ticket |

