WordPress password hash generator
Generates the real $wp$2y$ hash current WordPress stores — bcrypt with Core's SHA-384 pre-hash, not the older phpass format most generators still produce.
$wp$2y$ Example — generate your own aboveUPDATE wp_users SET user_pass = '$wp$2y$10$AdI22UdZ64ERx5N3G7FYLeq5O2DA9XCRsUOADUP31jVEqdModbOlu' WHERE user_login = 'admin' LIMIT 1;
Use the prefix from $table_prefix in wp-config.php. The example above is the hash of correct horse battery staple — never apply it to a real account.
How WordPress hashes it
Since WordPress 6.8, Core hashes a password in four steps rather than bcrypting it directly. This matters because it means a plain bcrypt hash — even a correctly-formed one — is not what WordPress actually stores.
This generator runs that exact sequence in your browser, so the value it produces is verifiable byte-for-byte against what wp_hash_password() would store. After hashing, it immediately re-checks the result the way wp_check_password() does and only reports success once that check passes. Full detail: why a hash starts with $wp$2y$.
Why plain $2y$ bcrypt fails in WordPress
Most online "bcrypt generators" — and PHP's own password_hash() — bcrypt the password itself. WordPress 6.8+ bcrypts an HMAC-SHA-384 digest of the password, so the two produce different values for the same input, and only one of them logs you in through the normal WordPress path:
| Plain bcrypt | WordPress 6.8+ bcrypt | |
|---|---|---|
Example for correct horse battery staple | $2y$10$U4PbpmbD8NQIbnxxpZChEOYf86FLHzg6rKQeYpVuJ68CDBbOxF54C | $wp$2y$10$AdI22UdZ64ERx5N3G7FYLeq5O2DA9XCRsUOADUP31jVEqdModbOlu |
| What bcrypt receives | The raw password | Base64 of HMAC-SHA-384(password, wp-sha384) |
| Length | 60 characters | 63 characters |
| Passwords over 72 bytes | Silently truncated | Full length counts |
| How WordPress treats it | Checked with password_verify() as a fallback, then rehashed on login | The native format Core writes |
A plain bcrypt hash is therefore not a dead end: wp_check_password() still accepts a valid $2y$ value and upgrades it on the next successful login. It becomes a problem when a plugin or a hand-written check compares the stored value with a hash it computed itself, or when a password longer than 72 bytes is silently cut short. Generating the $wp$2y$ form directly avoids both, and the hash checker tells you which format a stored value already uses.
Quick answers
Will this hash work on WordPress 6.7 or earlier?
No. Versions before 6.8 do not recognize the $wp$ prefix and cannot verify this format. Use the legacy phpass generator for those installs instead.
What bcrypt cost should I pick?
10 matches what WordPress Core uses by default and is a reasonable choice for most sites. 11 or 12 take longer to compute but resist offline cracking better; only raise it if your host's CPU budget for login requests can absorb the extra time.
Is this the same as running password_hash() in PHP?
Not directly. PHP's password_hash() would bcrypt the password itself. WordPress instead bcrypts an HMAC-SHA-384 of the password, which is what this generator reproduces.
Can I paste this hash straight into the database?
Yes — into the user_pass column of the users table, replacing the existing value for that account. The SQL panel above fills in that statement automatically once a hash is generated, using your table prefix and username, and ends with LIMIT 1 so it can only ever touch one row.
Why does the same password give a different hash every time?
bcrypt generates a fresh random 22-character salt for every hash and stores it inside the result. Two hashes of the same password therefore never match as strings, yet both verify correctly, because the checker reads the salt back out of the stored value. That is the design working, not a bug.
Will WordPress rehash this on next login?
Not if it matches the site's current settings. WordPress only rehashes a $wp$2y$ value when its cost differs from the configured default, so a cost-10 hash on a default install stays exactly as stored. Older $P$ or plain bcrypt values are upgraded to $wp$2y$ at the next successful login.