Change your WordPress password with WP-CLI
If you installed WP-CLI on your server to manage your WordPress site, then you can follow these steps to update your password. If you have not set up WP-CLI, then you will need to do so before using these steps.
- You should always backup your site before performing any changes.
- Connect to your server or shared hosting account with SSH
- Change to the root directory for your WordPress site.
- Use the following command to view a list of users for your WordPress site. Make note of the ID number for the user you want to update.
$ wp user list
- Use the following command to update the password for that user.
$ wp user update id --user_pass=password
- id is the number you located in Step 4.
- password is your new password.
You can now login with your new password.
More Info
- Here's what to do if you're unable to sign in to WordPress.
- If you need assistance with changing your password, our WordPress Premium Support team can help.