Why you might need to change your WordPress password

WordPress has come under a number of online threats over the years. In July 2026, the platform was impacted by the wp2shell exploit, requiring users to perform urgent site updates. The major PHP vulnerability detected in October of the same year also put many of the older WordPress website builds at risk.

If you’ve been running a WordPress website for years, you might want to consider updating your login credentials while you handle the security patches. You can check if you’ve been hacked using a data breach monitoring tool. You should also update your WordPress password if you’ve used the same credentials on a different website. Reused credentials increase the risk of your data getting compromised.

A security breach isn’t the only reason to change your WordPress password. You might have simply forgotten your WordPress password, in which case you need to go over the reset process.

How to change your WordPress password through the dashboard

WordPress offers a few ways to change your password. The most straightforward one is through the dashboard:

  1. Open the WordPress dashboard.

  2. In the sidebar, select “Users.”

  3. Hover over your username and select “Edit.”

  4. Under “Account management,” locate “New password” and select “Edit account settings on WordPress.com” to be redirected to the security settings.

  5. Enter your new password. It must be at least six characters long and contain upper and lowercase letters, numbers, and symbols. You can select “Generate strong password” to let WordPress create it for you or use a password manager with a built-in generator.

  6. Select “Save.” 

How to reset another user’s WordPress password

As a site administrator, you can share a website with other users and make them contributors, authors, editors, or administrators. If one of these users forgot their WordPress password, you can reset it for them:

  1. Open the WordPress dashboard.

  2. In the sidebar, select “Users.”

  3. From the list, choose which user you want to manage, hover over their username, and select “Edit.”

  4. Under “Account management,” click “Generate password.”

  5. Select “Update user.” The user will then receive an email with their new password details.

How to reset your WordPress password through the login page

If you forgot your WordPress password, you can reset it through the login page:

  1. Open the WordPress login page.

  2. Enter your email address or username and select “Continue.”

  3. Select “Lost your password?”

  4. Enter your email address in the field and select “Reset password.”

  5. Open the password reset link that was sent to your inbox.

  6. Enter the new password.

  7. Select “Reset password.”

How to reset your WordPress password using FTP or an emergency script

If you have a website you created ages ago and don’t remember the email address it uses or no longer have access to that inbox, you might run into trouble while resetting your WordPress password. However, as a last resort, you can use file transfer protocol (FTP) or an emergency script to reset the administrator password.

Note: You need to know your administrator username for this process.

To use FTP, you need to:

  1. Use an FTP client to access your site.

  2. Navigate to the root directory.

  3. Locate wp-content/themes and find the folder containing the current active theme.

  4. Find and open the functions.php file.

  5. Under <?php, add wp_set_password( 'password', 1 ); to set a new password. Make sure you replace the password filler with one you intend to use.

  6. Save the modified file.

To use the emergency script, you need to:

  1. Create a file called emergency.php in your root directory where WordPress is installed.

  2. Paste the emergency script in the file.

  3. Open http://example.com/emergency.php in your browser.

  4. Enter the administrator username and the new password.

  5. Select “Update options.”

  6. Check your email inbox for the updated credentials.

  7. Delete the emergency.php file from the directory once the process is complete.

How to change your WordPress password via WP-CLI

For a developer-friendly way to change your WordPress password, you can use WP-CLI. This method is recommended if you use Linux:

  1. Open your website through WP-CLI.

  2. Locate the root directory.

  3. Type the command wp user list to find your user ID. The admin ID is always 1.

  4. Type the command wp user update 1 --user_pass=password and replace “password” with the password you want to use. 

How to change your WordPress password through phpMyAdmin

If you’re locked out of your WordPress dashboard and the “Lost your password?” email isn’t arriving, you can reset the password and set up a temporary one directly in the database with phpMyAdmin. Before you do this, you should export your database to have a backup in case you make an error while editing.

Note: Starting with WordPress 6.8, passwords are hashed with bcrypt through PHP’s password_hash() function. In the database, these hashes start with wp2y$. The older MD5 method is outdated and much weaker. MD5 is very fast to compute, so attackers can test billions of guesses per second, and it isn’t safe for storing passwords. However, WordPress still accepts an MD5 hash for backward compatibility. When you log in with it, WordPress automatically replaces it with a secure bcrypt hash. Use MD5 only as a temporary step to get back in, and never leave it as the stored value.

To use the phpMyAdmin password recovery process:

  1. Log in to your hosting control panel.

  2. Under the “Databases” section, open phpMyAdmin.

  3. In the left sidebar, select your WordPress database.

  4. Open the wp_users table.

  5. Find the row with your username in the user_login column and select “Edit.”

  6. Find the user_pass field. It holds the current password hash.

  7. Delete the existing value and type a new temporary password in plain text.

  8. In the Function dropdown next to the field, choose MD5.

  9. Select “Save” to confirm.

  10. Go to yoursite.com/wp-login.php.

  11. Log in using your username and the temporary password. WordPress will automatically rehash your password with bcrypt and replace the MD5 value.

To set a strong permanent password, follow the instructions detailed in the “How to change your WordPress password through the dashboard” section of this blog post.

How to change your WordPress password through cPanel

If you host your site with a shared hosting provider like Namecheap, HostGator, or A2 Hosting, you can reset your WordPress password without touching the database at all. Most of these hosts include the Softaculous Apps Installer in cPanel — the same tool many people use to install WordPress with one click. Softaculous can also change your admin password in a few clicks.

Note: This method only works if WordPress was installed through Softaculous or later imported into it. If you installed WordPress manually, your site may not appear in Softaculous. In that case, use the phpMyAdmin method instead.

To use the cPanel password reset process:

  1. Log in to your hosting account and open cPanel.

  2. Locate the “Software” section or type “Softaculous” in the cPanel search bar.

  3. Select “Softaculous Apps Installer.”

  4. In Softaculous, select the “Installations” icon in the top menu.

  5. You’ll see a list of every WordPress site installed on your account. Find the site whose password you want to change.

  6. Select “Edit details.”

  7. Locate the “Admin account” section. In the “Admin username” field, select the account you want to update.

  8. In the “Admin password” field, enter your new password.

  9. Select “Save installation details.”

  10. Go to yoursite.com/wp-admin or yoursite.com/wp-login.php.

  11. Log in using the new password.

Bottom line

Password resets are never fun, especially if your life’s work is at stake. However, WordPress gives you plenty of options to restore your account access, even if you don’t have all the information you need to log in as usual.

To log in to your WordPress dashboard faster and avoid the trouble of using multiple methods to restore your password, consider using NordPass to store your credentials. NordPass’ autofill feature matches your saved passwords to the website you’re visiting, letting you log in with a click. Manage your digital life and your websites more easily with a reliable password manager.