If you forgot your WordPress admin panel password, don’t worry. Normally, you can use the "Lost Your Password" link to create a new one. However, in some cases, you may not receive the reset email, or you might not have access to your registered email address. In such situations, you can change your password directly via the database. For this, we will use PhpMyAdmin.
Below, I will explain step by step how to reset your WordPress admin password through PhpMyAdmin.
Resetting WordPress Password Using PhpMyAdmin
PhpMyAdmin is a tool used to manage databases and is usually found in your hosting provider’s cPanel.
If your hosting provider uses a different control panel, the login method may vary. However, in general, you can access PhpMyAdmin from your hosting management panel.
Finding the Correct Database
If you have multiple WordPress sites, you need to determine which database belongs to the site you want to modify.
-
Access your site’s files using File Manager or FTP.
-
Navigate to the
public_html
folder (or the directory where WordPress is installed). -
Open the
wp-config.php
file. -
Find the
DB_NAME
line. The name specified here is the database you need to use. For example:define('DB_NAME', 'wordpress_db');
Opening the wp_users Table
Once you access PhpMyAdmin:
- Locate your database on the left panel and click on it.
- In the list that appears, find the
wp_users
table (it may have a different prefix, such aswpxyz_users
). - Click the Browse option. You will now see the registered users on your site.
Changing the Admin Password
Find the admin user whose password you want to change and click Edit. In the user_pass
field, enter a new password. Select MD5 as the encryption method from the dropdown menu.
For example, if your new password is NewPassword123
:
Delete the old password. Enter the new password: NewPassword123
. Set the function to MD5.
Note: MD5 encryption was used in older WordPress versions. In newer versions, WordPress automatically updates the password with a more secure hashing algorithm when you log in. This method still works.
Click Go/Save to save the changes.
Logging into the WordPress Admin Panel
Now, you can log in to your WordPress admin panel using your new password.
- Username:
admin
(or your own admin username) - Password:
NewPassword123
Note: After logging in, go to the Profile section and set a stronger password for better security.
If you forgot your WordPress admin password and cannot reset it via email, changing it through PhpMyAdmin is one of the fastest solutions.