How to Reset a WordPress (Admin) Password
Occasionally, it is necessary to reset a WordPress password. Sometimes you still have access with the old password, and simply want to make a new password to keep potential attackers guessing. Other times, you might have forgotten the old password, and need to set a new one in order to access your account in the site. Depending on the situation, there are a few different ways to reset a WordPress user’s password, even if it is the WordPress admin password being reset.
How to Reset a WordPress Password via WordPress
This is going to be the most straightforward method if you still have access to the account. How to do this varies slightly depending on whether you are changing your own password, or if you are using an admin account to change someone else’s password.
How to Reset Your Own WordPress Password via WordPress
First, log into WordPress.
If you are not an administrative user, your WordPress account’s options will be very minimal. To change your password, make sure you are on the “Profile” page, and scroll down to “Account Management”. Next to “New Password” click the “Generate Password” button:
If you like, you can use the password that WordPress generates for you. Otherwise, you can also generate your own. Once you have chosen a password and entered it in the “New Password” box, you can click “Update Profile” at the bottom of the page:
You should then see a confirmation message like this:
How to Reset a WordPress Password via WordPress as Admin
As before, first log into WordPress.
Then, go to the “All Users” page in the “Users” section. If you hover your cursor over the name of the desired user, you will see the “Edit” link appear:
As before, scroll down to “Account Management”, click “Generate Password”, enter the new password in the box, and click “Update User”. You should see a confirmation page:
How to Reset the WordPress Admin Password via My KnownHost
This method is only available to our Managed WordPress Hosting customers.
How to Reset a WordPress Password via MySQL
Since WordPress stores account information in a database, you can use mysql to reset the passwords. If doing so, it is strongly recommended to afterwards change the password again from within WordPress, to make sure the new password is salted.
If you have access to phpMyAdmin, you can also use that to change the WordPress passwords. On a cPanel server, you can access phpMyAdmin from within cPanel, by clicking “phpMyAdmin” in the “Databases” section:
Then, find the database the site uses, and the table the users are stored in. Usually the table will be called
wp_users but even if it uses a different table prefix it will usually still have a name ending in
_users. When browsing the table, you can deselect some of the columns to make it easier to read. Once you have found the row corresponding to the user whose password you need to change, click “Edit”.
Next, you’ll need to decide on a temporary password. It is recommended that even this temporary password is randomized, in case someone tries to guess it before you’ve had a chance to reset it from within WordPress.
Then, in the row for user_pass, choose “MD5” from the dropdown box, and put the new password in the “Value” column. Make sure “Save” is selected in the dropdown at the bottom, and then click “Go”.
After that, you should see a success message:
Be sure to remember to quickly log into WordPress to change the password again there, so that it will be stored salted, and with a stronger hash.