How to recover the WordPress administrator password
To recover the WordPress administrator password, start with the “Lost your password?” link on the login screen, which sends a reset link to the user’s email. If the email doesn’t arrive or is no longer accessible, you can change the password through Softaculous in cPanel, or directly in the database using phpMyAdmin.
The three methods are listed below, from the simplest to the most technical. Use the first one that works.
Which method to use
| Situation | Method |
|---|---|
| You still have access to the user’s email | Method 1: by email |
| You don’t have access to the email, but you can access cPanel and WordPress was installed with Softaculous | Method 2: with Softaculous |
| You don’t have access to the email, and the installation doesn’t appear in Softaculous | Method 3: with phpMyAdmin |
| You can’t access cPanel either | Ask hosting support to recover your access to the hosting account |
Method 1: by email
- Open the site’s login address:
yourdomain.com/wp-admin. - Click Lost your password?.
- Enter the administrator’s username or email address and confirm.
- Open the email you receive and click the link to create a new password. Also check your spam folder.
If the message doesn’t arrive after a few minutes, check that the email address you entered is the same one registered to the user, and that the mailbox isn’t full or blocked. Some sites have WordPress email sending turned off or misconfigured, so the link never arrives. In that case, go to method 2 or 3.
Method 2: with Softaculous
If WordPress was installed with Softaculous, the installer keeps track of the installation and lets you edit the administrator’s username and password.
- Log in to cPanel and open Softaculous Apps Installer (the option may appear as Softaculous or WordPress Manager).
- Open the Installations list and find your site.
- Click the edit (pencil) icon for the installation.
- Look for the administrator fields, such as Admin Username and Admin Password, enter the new password, and save.
- Log in at
yourdomain.com/wp-adminwith the new password.
Button and screen names change depending on the Softaculous version. If your site doesn’t appear in the installations list, it was installed another way, and the path is method 3.
Method 3: with phpMyAdmin
With this method, you change the password directly in the WordPress database. It’s safe if done carefully, but it requires attention: back up the database first.
Step 1: back up the database
- In cPanel, open phpMyAdmin.
- In the menu on the left, click your site’s database. If you’re not sure which one it is, open the
wp-config.phpfile in File Manager and look for theDB_NAMEline. - Click the Export tab, then click Export again, using the default options. The downloaded
.sqlfile is your copy.
Step 2: find the user
- In the list of tables in the database, open the one that ends in
_users. The beginning of the name is the WordPress prefix, such aswp_users. Your site’s prefix may be different. - Click the Browse tab. A list of users appears, with the columns
user_login,user_pass, anduser_email. - Find the administrator’s row and click Edit on that row.
Step 3: save the new password
- In the
user_passfield, open the Function dropdown (in the middle column) and choose MD5. - In the value field, delete the existing text and type the new password.
- Click Go (or Continue) at the bottom of the screen.
- Log in at
yourdomain.com/wp-adminwith the username and the new password.
WordPress accepts a password stored in MD5 and converts it to a more secure format as soon as you log in. So, after logging in, change the password under Users > Profile, so it gets saved with the current protection. Use a long, unique password that you don’t use anywhere else.
If you’d rather not edit the database, method 2 solves the same problem through Softaculous.
After recovering access
- Change the password to a strong one, using a password manager.
- Review the list of users under Users. If an administrator appears that you didn’t create, it may be a sign of a hack: see how to use AI to remove malware from a WordPress site.
- Check the administrator’s email under Users > Profile. That’s where notifications and reset links are sent.
- If you use a security or two-factor authentication plugin, make sure it still works.
If nothing works
If your site uses a security plugin that changed the login address, /wp-admin may open an error page or another page. Look for the new address in the plugin’s installation email, or disable the plugin by renaming its folder in wp-content/plugins, as shown in the article 500 error or white screen in WordPress.
If you can’t access cPanel, your email, or the database, the way forward is to ask your hosting support for help. MigraCloud can be reached here.
Frequently asked questions
How do I recover my WordPress password if I no longer have the email?
Use Softaculous or phpMyAdmin in cPanel. Neither depends on the user’s email: the first edits the installation’s password, and the second writes the new password directly to the database.
Can I change the password through phpMyAdmin without breaking the site?
Yes, as long as you only edit the user_pass field of the correct user and back up the database first. Don’t delete rows or tables. If something goes wrong, import the .sql backup through the same phpMyAdmin.
Why do I choose MD5 in phpMyAdmin?
WordPress recognizes passwords stored in MD5 and converts them to the current format on the first login. It’s a traditional recovery method. After logging in, change the password from your profile so it’s saved in the more secure format.
The password reset link doesn’t arrive by email. What could be the reason?
The email may be in your spam folder, the address registered to the user may be a different one, or email sending from the site may have a problem. Use Softaculous or phpMyAdmin to log in and then fix the email sending.
Can I create a new administrator instead of changing the password?
Yes. In phpMyAdmin, you can insert a new user into the _users and _usermeta tables, but it’s a more delicate procedure. Changing the password of the existing user is simpler and safer.
How do I avoid losing the password again?
Store the password in a password manager, register an email address you check regularly in the administrator’s profile, and have at least one other trusted administrator user on the site.