Update a WordPress password with wp-cli

If you develop with WordPress and are handy on the command line, I highly recommend installing and using WP-CLI. https://developer.wordpress.org/cli/commands/

To update a user’s password on the command line:

Change directory to the root of your WordPress site.

cd <filepath>

wp user update <user> —-user_pass=<pass>

Where <user> is the email address of the user and <pass> is a cleartext password that will be encoded and stored for the user.