Key takeaways
- Try the built-in reset first; check spam for the email.
- phpMyAdmin lets you set a new password directly in wp_users.
- Investigate if you didn’t change the password yourself.
Option 1: “Lost your password?”
On the login page (/wp-login.php), click Lost your password? and enter your username or email. If the email doesn’t arrive, check spam — or the site may not be able to send mail, in which case use one of the options below.
Option 2: phpMyAdmin
- In cPanel, open phpMyAdmin and select your WordPress database.
- Open the
wp_userstable (your prefix may differ fromwp_). - Click Edit on your user.
- In
user_pass, choose MD5 from the Function menu and type a new password in the value field. - Click Go.
WordPress upgrades the stored hash to a stronger one the next time you log in.
Option 3: WP-CLI
If you have SSH access:
wp user list
wp user update admin --user_pass='a-new-strong-password'
Afterwards
- If you didn’t change the password yourself, assume the site may be compromised: change all admin passwords, check for unknown admin users and scan for malware.
- Set up working email delivery (for example via SMTP) so password resets reach you next time.