Regaining access when locked out.
WHEN YOU NEED IT
The password reset email does not arrive, usually because mail is not configured You have lost access entirely
THE METHOD
- phpMyAdmin, browse the wp_users table.
- Find your user row and click Edit.
- In the user_pass field, choose MD5 from the function dropdown.
- Type the new password in plain text in the value field.
- Go.
WordPress accepts an MD5 hash on login and immediately re-hashes it properly.
THE BETTER METHOD
WP-CLI, if you have SSH access. One command, handled correctly.
CREATING A NEW ADMINISTRATOR
If your account is damaged rather than just inaccessible, creating a new administrator is sometimes easier.
That requires rows in both wp_users and wp_usermeta, with the capabilities key carrying the correct table prefix.
Getting the prefix wrong is why this frequently appears to work and does not.
AFTERWARDS
Log in, change the password properly through the interface, and fix whatever prevented the reset email arriving.