WordPress.com is a popular platform for website building and web hosting. It shares its name with WordPress.org, the open-source self-hosting platform, and both of them use the same core software. So if you’ve built a website for your portfolio using WordPress.com and have forgotten what your password is — or suspect someone else has gained access to it and changed it — knowing how to update your credentials can help. Let’s go over the steps of changing and resetting your WordPress password and how you can reinforce your account’s security.
Contents:
- Why you might need to change your WordPress password
- How to change your WordPress password through the dashboard
- How to reset your WordPress password through the login page
- How to reset your WordPress password using FTP or an emergency script
- How to change your WordPress password via WP-CLI
- How to change your WordPress password through phpMyAdmin
Key takeaways:
Change your WordPress password from the dashboard. Go to “Users,” edit your profile, and open the security settings on WordPress.com.
A breach, a reused password, or a forgotten login all call for a password reset. Threats like the wp2shell exploit and the PHP vulnerability discovered in July and October 2026, respectively, make this more urgent for older sites.
You can reset another user’s password as an administrator. Open their profile under “Users,” select “Generate password,” and then “Update user.” The user then gets an email with the new details.
If you forgot your password, open the login page, select “Lost your password?,” enter your email address, and open the reset link in your inbox.
Use WP-CLI if you prefer the command line. Run wp user list to find your user ID, then run wp user update with the --user_pass option.
Try FTP or an emergency script as a last resort. This works when you've lost access to the email address linked to your account. You need your administrator username. Add a wp_set_password line to your theme’s functions.php file, or upload an emergency.php file to your root directory. Delete the script when you finish.
Edit the database in phpMyAdmin if you’re locked out. Back up your database first. Enter a temporary password in the user_pass field and choose MD5 as the function. WordPress replaces it with a secure bcrypt hash when you log in. Then set a strong permanent password through the dashboard.
Use Softaculous in cPanel on shared hosting. Open your installation, select “Edit details,” and enter a new admin password. This only works if you installed WordPress through Softaculous. Otherwise, use phpMyAdmin.
Store your credentials in a password manager. A tool like NordPass saves your passwords and fills them in for you. This spares you from repeated resets and speeds up your logins.
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:
Open the WordPress dashboard.
In the sidebar, select “Users.”
Hover over your username and select “Edit.”
Under “Account management,” locate “New password” and select “Edit account settings on WordPress.com” to be redirected to the security settings.
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.
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:
Open the WordPress dashboard.
In the sidebar, select “Users.”
From the list, choose which user you want to manage, hover over their username, and select “Edit.”
Under “Account management,” click “Generate password.”
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:
Open the WordPress login page.
Enter your email address or username and select “Continue.”
Select “Lost your password?”
Enter your email address in the field and select “Reset password.”
Open the password reset link that was sent to your inbox.
Enter the new password.
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:
Use an FTP client to access your site.
Navigate to the root directory.
Locate
wp-content/themesand find the folder containing the current active theme.Find and open the
functions.phpfile.Under
<?php, addwp_set_password( 'password', 1 );to set a new password. Make sure you replace thepasswordfiller with one you intend to use.Save the modified file.
To use the emergency script, you need to:
Create a file called
emergency.phpin your root directory where WordPress is installed.Paste the emergency script in the file.
Open http://example.com/emergency.php in your browser.
Enter the administrator username and the new password.
Select “Update options.”
Check your email inbox for the updated credentials.
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:
Open your website through WP-CLI.
Locate the root directory.
Type the command
wp user listto find your user ID. The admin ID is always 1.Type the command
wp user update 1 --user_pass=passwordand 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:
Log in to your hosting control panel.
Under the “Databases” section, open phpMyAdmin.
In the left sidebar, select your WordPress database.
Open the
wp_userstable.Find the row with your username in the
user_logincolumn and select “Edit.”Find the
user_passfield. It holds the current password hash.Delete the existing value and type a new temporary password in plain text.
In the Function dropdown next to the field, choose MD5.
Select “Save” to confirm.
Go to
yoursite.com/wp-login.php.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:
Log in to your hosting account and open cPanel.
Locate the “Software” section or type “Softaculous” in the cPanel search bar.
Select “Softaculous Apps Installer.”
In Softaculous, select the “Installations” icon in the top menu.
You’ll see a list of every WordPress site installed on your account. Find the site whose password you want to change.
Select “Edit details.”
Locate the “Admin account” section. In the “Admin username” field, select the account you want to update.
In the “Admin password” field, enter your new password.
Select “Save installation details.”
Go to
yoursite.com/wp-adminoryoursite.com/wp-login.php.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.