WordPress provides several ways to reset your user password. This article walks you through the following methods which range from simple to advanced:
- Changing your password in the WordPress panel
- Using the 'Lost your password' link
- Logging into phpMyAdmin
- Using wp-cli
For DreamPress sites
If your site is running on DreamPress and you reset the password as shown below, it's possible it may not work when you try to log in. This is most likely due to the object cache, which is still storing the old password.
To fix, just log into your server via SSH and run the following command:
[server]$ wp cache flush
Resetting your password in the WordPress panel
This option only works if you currently have access to your panel. This assumes you already know your current password and have logged in, then you're attempting to change it to something else.
- Log into your WordPress dashboard at 'example.com/wp-login.php'.
- In the left pane, click 'Users > All users'.
- From the list of all current usernames that appear, click the user you wish to reset the password for.
- On the user edit page, scroll down to the section titled Account Management.
- Click the Generate Password button.
- A very long auto-generated password displays. If you would like to keep this password, click the Update Profile button. Otherwise, edit the password field to enter your chosen password, then click Update Profile.
If you know your WordPress username, or the email address you use to sign in, you can reset the password on the login page.
- Navigate to your login page at 'example.com/wp-login.php'.
- Click the Lost your password? link under the login box.
- On the next page, enter either your WordPress username or email address you use to sign in.
- Click Get New Password. An email is sent that includes a link to reset your password.
- Clicking the link brings you back to the login page with a new password filled in. Click Reset Password. Copy this password to a text file like notepad (Windows) or TextEdit (Mac). If you just click 'Reset Password' you will be taken back to the login page, but the user/password fields may be blank. If you've copied it to a text file, you can easily paste it back into the new login prompt.
- After you're logged in, you can reset it in the panel as shown above.
Resetting in phpMyAdmin
If you have access to your DreamHost dashboard, you are able to view your phpMyAdmin credentials and log into your database.
- Log into your DreamHost panel.
- Navigate to the MySQL Databases page. On this page you can find all of your database credentials you'll need to log in. View the following article for full details on how to find this information and log into phpMyAdmin:
- Finding your database login credentials
- In the left pane, click your database name.
- Click the 'wp_users' table.
- You'll see a list of usernames. Click the Edit link to the left of the username you want to reset the password for.
- A page opens with your user's data.
- To the right of 'user_pass' you'll see a box with long string of numbers and letters. Delete everything in this box.
- Type in your new password.
- From the dropdown next to 'user_pass', select MD5.
- Finally, click the Go button. You should now be able to log in with the new password.
wp-cli is a command line tool you can use on your DreamHost server to manage your WordPress site. For more details, view the following article:
- WordPress wp-cli overview
- Make sure the username your WordPress site is under on the server is a Shell user. View the following article to confirm.
- Creating a user with Shell (SSH) access
- Log into your server via SSH.
- Navigate to your WordPress directory. Most likely, you can use the following command. Make sure to change the site to your website name. [server]$ cd example.com If your site is in a subdirectory, add that subdirectory name to the end of the site name. (e.g., example.com/blog)
- You are now in your WordPress directory. From here you can run wp-cli commands. Run wp user list to view a list of current users. Note the number to the left of the username. [server]$ wp user list +----+-------------+---------------+------------------+---------------------+---------------+ | ID | user_login | display_name | user_email | user_registered | roles | +----+-------------+---------------+------------------+---------------------+---------------+ | 1 | username | username | firstname.lastname@example.org | 2018-03-17 11:14:28 | administrator | +----+-------------+---------------+------------------+---------------------+---------------+
- To update the username, run the following command. You just need to update the 'ID' number and enter a password when prompted. [server]$ wp user update 1 --prompt=user_pass Success: Updated user 1
- You will immediately be emailed a notification that your password has been changed.
- You should now be able to log in with this new password.
- WordPress overview
- How to log into your WordPress site
- WordPress help articles