Security and SSL
Ways to recover or change a WordPress user's password
If you cannot log in to the WordPress dashboard (wp-admin) because you have forgotten the password, there is no way to recover the old one: WordPress stores it encrypted. What you can do is change it to a new one and log in straight away.
The WordPress password is separate from the cPanel and client area passwords: changing those does not change the WordPress one.
These are the methods, from the simplest to the most technical.
With "Lost your password?"
This is WordPress's own method. The link is below the login form and is sometimes easy to miss. Click it, enter your username or email address and you will receive a link to choose a new password. If it does not arrive, check your spam folder.

It does not work if you do not remember the username, if the administrator's email address no longer exists or if the site cannot send emails. In those cases, use any of the following methods.
With Softaculous
-
Log in to cPanel and open Softaculous Apps Installer.
-
At the top, click the WordPress icon to see the list of installations.
If your site does not appear in the list, click Scan in that same section and Softaculous will add it.
-
Next to the installation, click Manage users (the user icon).

-
Choose the user from the drop-down, enter the new password in Password and click Save.

You can now log in with that user and the new password.
With WordPress Toolkit
-
Log in to cPanel and open WordPress Toolkit.
-
Click your installation to expand its options.
If it does not appear, click Scan and WordPress Toolkit will find it and add it.
-
Click Setup, below the site's thumbnail.
-
Choose the user, enter the new password (and, if you like, change their email address) and save.

With WP-CLI
If you have SSH access, go to the installation's folder and list the users to see the exact name:
wp user list --fields=ID,user_login,user_email,roles
Then change the password. Replace USUARIO with the username or ID:
wp user update USUARIO --prompt=user_pass
WP-CLI will ask you for the new password without it being saved in the command history.
With phpMyAdmin
-
Find the database name and the table prefix in the installation's
wp-config.phpfile:define('DB_NAME', 'nombre_base_de_datos'); $table_prefix = 'wp_';
-
Log in to cPanel, open phpMyAdmin and select that database.
-
Open the
wp_userstable (with your prefix in front ofusers). -
Click Edit on the user's row.
-
In the
user_passfield, delete what is there and type the new password. In the Function drop-down for that row, choose MD5. This is essential: without MD5 the password will not work. -
Click Go.
If you prefer, you can do it with a query in the SQL tab (change the prefix, the password and the username):
UPDATE wp_users SET user_pass = MD5('NuevaContraseña') WHERE user_login = 'USUARIO';
MD5 is an old, weak hash, but WordPress accepts it and, the first time you log in, automatically replaces it with its current hashing. So, as soon as you log in, change the password from Users > Profile to a permanent one.
If you still cannot log in
- Check that you are using the correct address: some security plugins replace
wp-adminwith a different URL. - A security plugin, an IP restriction or two-step verification can block access even if the password is correct. If you suspect a plugin, rename its folder in
wp-content/pluginsfrom the cPanel File Manager to deactivate it. - If the user list shows administrators you do not recognise or the administrator's email address is not yours, your site may have been hacked. Follow what to do if your site has been hacked.
You may also find useful
- Change the main cPanel, FTP and SSH password Change the hosting's main credential and check which connections need updating afterwards.
- Exclude a directory or file when protecting a directory with a username and password Shows how to exclude a specific file from basic authentication with a Require rule in .htaccess with...
- How email, FTP and cPanel passwords are stolen, and how to prevent it The four most common ways a password is stolen (viruses, phishing, reused passwords and the browser)...
- Leech Protection: scope and compatibility with LiteSpeed Learn what Leech Protection controls in protected directories and why you should not rely on this fe...
Something wrong or out of date? Tell us and we will review it.