Reset WordPress Password
On the wp-login.php screen, click “Lost your password?”, enter your username or email, and WordPress emails a password reset link. This works as long as your site can send email and you still have access to that inbox.
The easy way — Lost your password? link
On the wp-login.php screen, click “Lost your password?”, enter your username or email, and WordPress emails a password reset link. This works as long as your site can send email and you still have access to that inbox.
Real-life example: This is like using “forgot PIN” on a banking app — a verified channel (email) proves it is really you before granting access.
When email is not working — reset via phpMyAdmin
On local installs, outgoing email often does not work by default. In that case, reset the password directly in the database using phpMyAdmin.
Open phpMyAdmin, select your WordPress database, open the wp_users table, find your row, and edit the user_pass field. Paste a new password, then set the Function dropdown next to that field to MD5 before saving.
UPDATE wp_users
SET user_pass = MD5('MyNewStrongPassword123!')
WHERE user_login = 'admin';Locked out completely — the wp-config.php trick
If you cannot reach phpMyAdmin either, you can add a temporary line to wp-config.php that forces a password reset email on the next login attempt, then remove that line once you are back in.
As a last resort with server access, you can also create a brand-new administrator account by inserting a row directly into wp_users and wp_usermeta tables — useful for recovering a client site with no working admin account.
- Always keep at least one recovery email that actually works
- Consider a password manager so this situation rarely happens
- For client sites, document admin credentials somewhere secure before handover