Forgetting the WordPress admin password is common, and so is a reset email that never arrives. As long as you can log in to cPanel, you can always get back in. Pick whichever method below suits you.
Before you start
- Try the obvious first: check the username (it may be an email address) and whether your password manager saved it.
- Have cPanel access ready via MdmHost dashboard → Services → Login to cPanel.
Method 1: the reset link
- Go to
https://yourdomain.com/wp-login.phpand click Lost your password? - Enter the username or email address and click Get New Password.
- Open the email and follow the link to set a new password.
No email after ten minutes? Check spam. If it never arrives, WordPress cannot send mail; use another method now and set up SMTP later.
Method 2: Softaculous
- Open cPanel → Software → Softaculous Apps Installer → Installations.
- Click the pencil (Edit Details) icon next to the install.
- Under Admin Account choose the user, enter a new password and click Save Installation Details.
This only works if the site was installed or imported through Softaculous.
Method 3: phpMyAdmin
- Find the database name in
wp-config.php(DB_NAME) and the table prefix. - Open cPanel → Databases → phpMyAdmin, select the database and open the
wp_userstable (with your prefix). - Click Edit on your user row.
- In the
user_passrow choose MD5 in the Function drop-down and type the new password in the value field. - Click Go. Log in with the new password; WordPress upgrades the hash to its stronger format automatically.
Method 4: WP-CLI
Open cPanel → Advanced → Terminal, then:
cd ~/public_html
wp user list --role=administrator
wp user update 1 --prompt=user_passReplace 1 with your user ID from the list. --prompt asks for the password so it is not saved in shell history.
Locked out with no admin user
If the admin account was deleted, for example after a hack, create a new one with WP-CLI:
wp user create newadmin you@example.com --role=administrator --prompt=user_passAfter you are back in
- Check Users → All Users for administrators you do not recognise.
- Store the new password in a password manager.
- Enable two-factor authentication.
- Set up SMTP so future reset emails arrive.
Troubleshooting
- Password accepted but you return to the login page: clear cookies, check Settings → General URLs match the address you use (http vs https, www vs non-www).
- "Too many login attempts": a security plugin locked you out. Rename its folder in
wp-content/pluginstemporarily. - Your IP is blocked at server level: check with the IP checker and contact support to whitelist it.
- phpMyAdmin edit does not work: you edited a different site's database. Confirm
DB_NAMEand the prefix inwp-config.phpagain.
Reset passwords for other users
As an administrator you can reset anyone's password from Users → All Users: hover over the user and click Send password reset, or open the profile and click Set New Password under Account Management. The same screen has Log Out Everywhere Else, which ends the user's sessions on other devices.
