Reset a WordPress user password
forgot wordpress admin password | reset wordpress password command line | cannot log in to wordpress | wp-cli | users | passwordCaution: This command changes the system. Understand what it does before you run it.
wp user update admin --user_pass=NewSecurePassword --path=/var/www/vhosts/example.com/httpdocsChanges the password of a user, identified by login, email or ID. Existing sessions stay valid until they expire. Useful when the password reset email never arrives.
Note: The password ends up in the shell history. Avoid this with a leading space (with HISTCONTROL=ignorespace) or by clearing the history afterwards.
Also searched as
- forgot wordpress admin password
- reset wordpress password command line
- cannot log in to wordpress