Overview
WordPress provides several ways to reset your user password. This article walks you through the following methods which range from simple to advanced:
For DreamPress Pro sites
If your site is running on DreamPress Pro 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 this, 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 long auto-generated password displays:
- If you wish to keep this password, click the Update Profile button. Otherwise, edit the password field to enter your chosen password and then click Update Profile.
Using the 'Lost your password' link
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, reset it in the panel as shown above.
In some circumstances, your site may not be able to send emails consistently due to a lack of proper SMTP authentication. If you have not received your password-reset email within 15 minutes, try using one of the other methods listed below. You can also review the following external article for a workaround:
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:
- In the left pane, click your database name.
- Click the wp_users table.
- A list of usernames appears:
- 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, delete the entire string of numbers and letters that appear in the box.
- Enter a new password.
- From the dropdown next to user_pass, select MD5.
- Click the Go button.
You should now be able to log in with the new password.
Using wp-cli
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:
Configure SSH
Before proceeding, make sure the username your WordPress site is under on the server is a Shell user. View the following article to confirm.
- Log into your server via SSH.
- Navigate to your WordPress directory. Most likely, you can use the following command.
Make sure to change example.com to your website name.
[server]$ cd example.com
- Within the WordPress directory, run the wp-cli command 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 | user@example.com | 2024-04-02 11:14:28 | administrator | +----+-------------+---------------+------------------+---------------------+---------------+
- Run the following command to update the username. 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.