About WordPress Password Hash Guide
WordPress never stores a password in readable form. Older sites contain portable phpass hashes that start with $P$, while recent WordPress versions hash new passwords with bcrypt and keep working with the old format. When someone logs in, WordPress can upgrade an old hash to the current method.
Never paste a hash from one site into another or write a plain MD5 value into the database by hand. The safe ways to reset a password are the lost password link, WP-CLI, or the wp_set_password() function. Enter the numeric user ID, and this tool prepares both the PHP and the WP-CLI command for you.
How to use WordPress Password Hash Guide
- Type the numeric ID of the WordPress user. The administrator is usually 1.
- Click Run Tool to generate the code.
- Run it once, replace the placeholder password with a strong one, then remove the code.
Example
Input
1
Output
// Run once from a temporary code snippet or mu-plugin, then delete it. wp_set_password( 'CHANGE-THIS-STRONG-PASSWORD', 1 ); // Or with WP-CLI: // wp user update 1 --user_pass='CHANGE-THIS-STRONG-PASSWORD'
Common uses
- Regaining access to an admin account when the lost-password email does not arrive.
- Resetting a client's password on a site you manage without touching the database.
- Understanding what the long string in the user_pass column means.
Privacy and safety
This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.
Frequently asked questions
Can I decrypt a WordPress password hash?
No. Hashes are one-way. You can only reset the password to a new value.
Is it safe to use the code snippet?
Yes, if you run it once and delete it straight away. Leaving a password-setting snippet active is a serious security risk.
Where do I find the user ID?
Open Users in the dashboard and hover over a name. The URL contains user_id=. You can also run wp user list with WP-CLI.