If you need to change your WordPress admin password, you can do it easily through the dashboard or using other methods if you're locked out.
You can reset your password in three ways, depending on whether you're logged in:
-
From your dashboard (if logged in)
-
By email (if locked out)
-
Through phpMyAdmin (advanced method)
Method 1. Changing the Password via WordPress Dashboard
-
Log in to your WordPress Dashboard
Use your admin username and password to access the dashboard at yourwebsite.com/wp-admin
.
-
Access the Users Section
In the left-hand menu, click Users, then click Profile (under your username). -
Scroll Down to the Account Management Section
Scroll down until you see the "Account Management" section. -
Click on "Set New Password"
In the password field, click on the button labeled Set New Password. WordPress will automatically generate a strong password, but you can delete it and enter your own if preferred. -
Save Changes
Once you’ve set a new password, scroll down and click Update Profile to save the changes. -
Confirmation
You will see a confirmation message that your profile has been updated, and your password has now been changed.
Method 2. Changing the Password via Email (if Locked Out)
-
Go to the Login Screen
If you’ve forgotten your password, go to the login screen (yourwebsite.com/wp-admin
). -
Click "Lost Your Password?"
Click the Lost your password? link under the login form. -
Enter Your Email
Enter the email address associated with your admin account and click Get New Password. -
Check Your Email
You will receive an email with a password reset link. Click the link in the email to set a new password. -
Set a New Password
Enter a new password and confirm it, then click Reset Password. You can now log in with the new password.
Method 3. Changing the Password via phpMyAdmin (Advanced)
If you are unable to reset your password through the dashboard or email, you can use phpMyAdmin to manually change it.
-
Log into cPanel
Access your hosting account’s cPanel. -
Open phpMyAdmin
In the Databases section, click on phpMyAdmin. -
Select the Database
In phpMyAdmin, locate and select your WordPress database from the left-hand sidebar. -
Find the Users Table
Look for the table namedwp_users
(the prefix might differ if you use a custom one). -
Edit the Admin User Row
Find the row that contains your admin username and click Edit. -
Change the Password
In the user_pass field, enter your new password and select MD5 from the dropdown (this hashes the password). Note: Some WordPress versions may not accept MD5 hashes—use this method only if others fail.
-
Save the Changes
Click Go to save your changes. Your password will now be updated, and you can log in using the new credentials. Use the login page (yourwebsite.com/wp-admin
) and enter your new password to confirm it works.
Tips for Strong Passwords
- Use a mix of uppercase and lowercase letters, numbers, and symbols.
- Avoid using easily guessable words like your name or "password123."
- Consider using a password manager to generate and store your passwords securely.