Live Chat

Domain Scan

(empty)

Login


Reset Your WordPress Password Without the Previous One
(29-jul-2024)

Resetting WordPress password using phpMyAdmin

Forgetting your WordPress password can be a major inconvenience, especially if you're locked out of your admin area. Fortunately, you can easily reset your WordPress password directly through the database using phpMyAdmin. This method provides a straightforward solution when you're unable to access your WordPress admin dashboard.

Accessing phpMyAdmin

First, you'll need to access phpMyAdmin through your web hosting control panel (cPanel). Here's how:
  • Go to Register.lk and log in to your account.
  • Navigate to the "Services" section.
  • Click on the green "Active" button next to your hosting package.
  • Select "Login to cPanel" to access your cPanel dashboard.
  • In cPanel, locate and click on the phpMyAdmin icon found in the Databases section.
Accessing phpMyAdmin through cPanel

Selecting Your Database

In phpMyAdmin, you will see a list of databases on the left side. Select the one corresponding to your WordPress site. Selecting your WordPress database in phpMyAdmin If you're unsure which one it is, you can find the database name in your "wp-config.php" file, which is located in the root directory of your WordPress installation. Find the database name in your wp-config.php file, which is located in the root directory

Finding the Users Table

Once you've selected your database, look for the table named "wp_users". Note that the table prefix (wp_) might be different if you've customized it during installation. Navigating to the wp_users table in phpMyAdmin

Editing the User

  • Click on the "wp_users" table to open it.
  • Locate the user whose password you want to change. Click on Edit.
Editing user details in wp_users table

Changing the Password

1. Modify the user_pass Field
  • In the user information, find the "user_pass" field. This field stores the password.
  • From the function dropdown menu next to the "user_pass" field, select "MD5". (WordPress originally used a simple implementation of the MD5 hashing algorithm.)
  • In the "Value" field, enter your new password.
Changing the password in the user_pass field 2. Save the Changes
  • After entering the new password, scroll down and click the "Go" button to save the changes.

Using an SQL Query

Alternatively, if you prefer using an SQL query to change the password, follow these steps:
1. Open the SQL Tab
In phpMyAdmin, select your database and then click on the SQL tab at the top. Select your database table and then click on the SQL tab at the top 2. Run the SQL Query
Enter the following SQL query, replacing new_password, username, and wp_ with your actual values Running SQL query to update WordPress password Click the Go button to execute the query.

Verifying the Changes

After updating the password, try logging into your WordPress site using the new password. If you encounter any issues, double-check the steps to ensure everything was done correctly.

Conclusion

Changing your WordPress password directly from the database is a straightforward process with phpMyAdmin. Whether you use the table editing method or an SQL query, these steps ensure you can regain access to your site quickly and securely.

Ensure your password is secure and consider using a password manager to prevent similar issues in the future. If you have any questions or need further assistance, feel free to reach out to our support team.


Written by: Register.lk Support Hero - Shamendra
BACK 2 BLOG