If you're like us, chances are, every so often you will forget a WordPress Administrator password and you'll need to reset it. Luckily, WordPress has quite a number of ways in which you can change an Administrator (or any other user) password, of course as long as you still have access to the website via your hosting account.
Reset your password via email
WordPress makes it very easy to reset your password if you have access to the original email that you had associated with your account. Simply visit the WordPress login page, and click on the Lost your Password link.
You will then be asked to enter the username or the email address of the user whose password you have forgotten.
Once you do that, you will be sent an email with a link to reset the password. Click on the link and follow the instructions.
Change your WordPress password via PHPMyAdmin
Be Careful: Do not perform any modifications, delete or change any of the WordPress database tables if you do not know what you are doing. You can potentially corrupt your database, lose information or delete your whole database.
You can change the admin password if you have access to PHPMyAdmin. Browse to PHPMyAdmin using the database administrator and password which you should have available as part of your WordPress web hosting details.
Now you'll need to access the Users table in PHPMyAdmin:
On the left, you will see 2 links, click on the name of the database of the WordPress site you want to change the password for. You will see all the table names are prefixed with some letters, e.g. wp_
The table names are on the right of the Underscore.
Scroll down to the table wp_users. Click on the ‘Browse‘ tab.
You will now see a list of users - you need to find the user which you want to change the password for. Click on the ‘Pencil‘ or Edit to edit the WordPress Administrator user.
The next screen is where you can change your password, find the user_pass field:
- Change the user_pass dropdown to ‘MD5′
- Enter in a new password in the text box beside it - you can enter it in plain text, the password will then be encoded by PHPMyAdmin
See the screenshot below of how your wp_users table should look like. Then press Go.
Once you have done this, your WordPress administrator password is changed. You will see on the next screen that the password field changed to a bunch of letters and numbers that you didn’t enter.
That’s ok, because that’s how MySQL stores your password. Don't forget this password too :)
Go to your Wordpress Administrator login and try out the new username and password you entered.
Change your password via FTP or the File Manager of CPanel
You can also change the password by changing a file via FTP or using the CPanel File Manager.
- Access the files of your website via FTP or File Manager and edit the functions.php file of your current theme
- Edit the functions.php file and add the following to it, at the very top right after the first <?php
wp_set_password( 'password', 1 );
- Change the 'password' text with your new password for the admin user. The reason why we put "1" is because the user ID number in the wp_users table of the Administrator is usually 1 - although sometimes it may not be the case. In that case, you'd have to use the above method via phpmyadmin
- Save the modified file back to your site - replacing the old version and access the front-end of your website, and make sure you refresh the site at least once
- After refreshing, you should be able to log in
- VERY IMPORTANT: Make sure that you remove this code by following the same procedure. Besides being a vulnerability because the password is stored in plaintext, the code will reset your password each time you access your site until you remove it.
And these ladies and gentlemen are the easiest ways to reset the WordPress administrator password if you forgotten it!
Need help getting access to your website? Try these top-rated affordable gigs on Fiverr!
Click here to find experts on WordPress speed optimization.
Click here to create a full WordPress website.
Frequently Asked Questions
How do I recover WordPress password without email?
To recover WordPress Password without email, you'll need to have access to the WordPress database. Go to the wp_users table, and find the user you need to reset the password for. In the user_pass field, enter a new password and select the MD5 value in the dropdown. Click on Go to save the new password.
Where do I find my WordPress password?
The WordPress password is not stored anywhere in plain text. If you forgot the WordPress password, you'll need to reset it via the WordPress database, the Lost my Password function or the FTP method described here.
Where do I find my username and password?
The username of the users in your database can be found in the wp_users table in the WordPress database. The password will not be found in plain text, if you forgot you will need to perform one of these procedures to reset it.
Conclusion
Have you discovered an easier way to reset or change your WordPress website password? Something which is easier and faster maybe? We'd be happy if you shared it with us in the comments below.
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!
Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.