WP-CLI (WordPress Command Line Interface) is a WordPress function enabled for WordPress Hosting at InMotion. If you’re unable to login, there are multiple ways to reset your WordPress password, including via Softaculous. Here we’ll cover how to reset a WordPress user password using WP-CLI.
Reset the User Password
- SSH into your server and the cPanel user which owns the website using the correct steps for your hosting plan – shared or VPS/Dedicated.
- Use the
cdcommand to enter the domain’s document root, e.g.
NOTE: Be sure to replace public_html/my_website with the actual path to the document root directory of your website.
- Ensure you’re in the correct WordPress installation with the following command:
wp option get home && wp option get siteurl
- To list all users within that website, type the following command:
wp user list
Below is an example of the expected output.
- Use the following command to reset the WordPress user password replacing USER with the appropriate user-login and NewStrongPassword with a strong password:
wp user update USER --user_pass=NewStrongPassword
Congratulations on resetting your WordPress user password from the command line. Learn more about WP-CLI at our WP-CLI Education Channel.