The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · Bash

Reset Any User’s Password from the Command Line

Shared by Jainil Nagar · October 7, 2026

32 views
Back to Snippets

Fastest admin recovery method when locked out and email isn’t working.

Usage:

Use username, email, or user ID – all three work with wp user update

# Reset by username
wp user update admin --user_pass="NewStrongPassword123!"

# Reset by email address
wp user update john@example.com --user_pass="NewStrongPassword123!"

# Reset by user ID
wp user update 1 --user_pass="NewStrongPassword123!"

# Generate a random password instead of setting one manually
wp user generate-password 16

Tested on

WordPress 7.1

Reported by the author on October 7, 2026. WPFolks has not verified this.

Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments

Proudly supported by