1. Home
  2. Docs
  3. Others
  4. How to Change Your WordPress Password Using phpMyAdmin

How to Change Your WordPress Password Using phpMyAdmin

Have you ever found yourself locked out of your WordPress website, unable to log in because you forgot your password, or perhaps your usual password reset method isn’t working? Don’t panic! While it might seem daunting, you can regain access to your WordPress site by directly changing your password in the database using phpMyAdmin.

This method is particularly useful when:

  • You’ve forgotten your WordPress admin password and the email reset isn’t functioning.
  • You need to quickly reset a user’s password without access to the WordPress dashboard.
  • Your site is experiencing issues that prevent normal login.

Let’s walk through the steps.

Prerequisites

Before you begin, ensure you have:

  1. Access to phpMyAdmin: This is usually provided through your web hosting control panel (like cPanel, DirectAdmin, Plesk, etc.).
  2. Your WordPress database name: If you’re unsure, you can find it in your wp-config.php file, located in the root directory of your WordPress installation. Look for the line define('DB_NAME', 'your_database_name');.

Step-by-Step Guide

Follow these instructions carefully to change your WordPress password.

Step 1: Log in to phpMyAdmin

Access your web hosting control panel and locate the phpMyAdmin icon or link. Click on it to open the phpMyAdmin interface.

Step 2: Select Your WordPress Database

On the left-hand side of the phpMyAdmin interface, you’ll see a list of databases. Click on the database associated with your WordPress installation. If you have multiple databases, use the name you found in wp-config.php to identify the correct one.

Step 3: Find the wp_users Table

Once you’ve selected your database, you’ll see a list of tables within that database. WordPress stores user information in a table typically named wp_users (or wp_ followed by a custom prefix, like wp_abc_users). Locate and click on this table.

Step 4: Identify the User to Modify

In the wp_users table, you’ll see a list of all registered users on your WordPress site. Find the row corresponding to the user whose password you want to change (usually your administrator username).

Once you’ve found the correct user, click on the “Edit” link (it often looks like a pencil icon) in that user’s row.

Step 5: Change the user_pass Field

You’ll now see the details for the selected user. Look for the field named user_pass. This is where the hashed version of the user’s password is stored.

  1. In the “Function” column next to the user_pass field, select MD5 from the dropdown menu. This is crucial because WordPress stores passwords as MD5 hashes for security.
  2. In the “Value” column for the user_pass field, delete the existing hashed value and type your new password in plain text. For example, if your new password is MyStrongPassword123!, type that directly into the value field.Important: Do NOT type the MD5 hash here. phpMyAdmin will apply the MD5 function to the plain text password you enter.

Step 6: Apply Changes

After setting the MD5 function and entering your new plain text password in the user_pass field, scroll down to the bottom of the page and click the “Go” button to save your changes.

Important Notes & Troubleshooting

  • Clear Browser Cache: After changing the password, it’s a good idea to clear your web browser’s cache and cookies before attempting to log in, especially if you were previously trying to log in with the old password.
  • Security: Always choose a strong, unique password. After logging in, consider changing the password again through the WordPress dashboard for an extra layer of security, as WordPress uses more robust hashing algorithms (like bcrypt) for passwords created through the dashboard.
  • Table Prefix: If your WordPress installation uses a custom database table prefix (e.g., wp_xyz_users instead of wp_users), make sure you select the correct table name.
  • Backup: While this is a relatively safe procedure, it’s always a good practice to back up your database before making direct changes.

Conclusion

Changing your WordPress password via phpMyAdmin is a powerful and effective way to regain control of your site when standard methods fail. By following these steps, you can quickly reset your access and get back to managing your WordPress content. Remember to keep your login credentials secure and use strong, unique passwords for all your online accounts!

How can we help?