WP-CLI is a great tool for managing WordPress sites from the command line. As an example you can quickly change a WordPress user’s password with WP-CLI. This can be very handy on sites that you don’t have a WordPress admin login. First, if you don’t already have WP-CLI installed then follow the instructions here:
Then “cd” to the root of the WordPress site and run the following command:
1 |
wp user update <user> --user_pass=<pass> |
Where <user> is the username and <pass> is the new password.
Here’s an example:
1 |
wp user update bob --user_pass=wYdG2qpcZn4OAUik |
You can actually update other user parameters with the “user update” sub-command. See the full docs here:
http://wp-cli.org/commands/user/update/