How to Edit WordPress User Login via phpMyAdmin: A Complete Guide – Learn how to quickly regain access to your WordPress site by manually changing your username and password directly from the database. This comprehensive guide provides easy-to-follow steps, ensuring you can recover your login credentials when locked out or enhancing your site’s security. Perfect for beginners and advanced users alike!
WordPress is a powerful and flexible content management system (CMS), but there are times when you might lose access to your admin dashboard. If you find yourself locked out due to a forgotten password or username, you can regain access by manually updating your login credentials directly from the database. This guide will walk you through the process step-by-step, ensuring you can get back into your WordPress site quickly and efficiently.
Why Would You Need to Change Your WordPress Username or Password?
There are several scenarios where you might need to change your WordPress username or password directly from the database:

- You’ve forgotten your WordPress login password and can’t recover it via email.
- You’ve been locked out of your admin account by a plugin or a security setting.
- Your WordPress site has been hacked, and the hacker has changed your login details.
- You want to enhance security by changing your username, which is not allowed through the WordPress dashboard by default.
Edit WordPress user login via phpMyAdmin: Stepping Guide
Step 1: Access Your WordPress Database
To manually change your WordPress username and password, you first need to access your website’s database. This is typically done through your web hosting control panel (such as cPanel) or via phpMyAdmin.

Using cPanel
- Login to your web hosting account and go to cPanel.
- Under the Databases section, click on phpMyAdmin.
- Once phpMyAdmin is open, locate your WordPress database on the left-hand side and click on it.

Using phpMyAdmin Directly
- If your host provides direct access to phpMyAdmin, log in and select your WordPress database.
Step 2: Locate the WordPress Users Table

Once you have access to your WordPress database, the next step is to locate the table where your user information is stored. The table you’re looking for is typically named wp_users
. However, if you’ve changed the table prefix during installation, it might be something like abc_users
.

In phpMyAdmin:
- Click on the
wp_users
table in the left column. - You will see a list of users registered on your WordPress site.

Step 3: Changing the Username
To change the username:
- In the
wp_users
table, find the row that corresponds to the user whose username you want to change. - Click the Edit link in that row.
- Locate the
user_login
field. This is where your username is stored. - Change the value in the
user_login
field to your desired username. - Once you’ve made the change, scroll down and click Go to save the changes.

Your username is now updated. You can log in to WordPress using this new username.
Step 4: Changing the Password
Next, you’ll want to change the password for your WordPress account.
- In the
wp_users
table, find the row corresponding to the user whose password you want to change and click Edit. - Locate the
user_pass
field. This field contains your password, but it’s stored as a hash for security reasons. - To change the password, you need to replace the current hash with a new one. WordPress uses the MD5 hashing algorithm by default.
Generating an MD5 Hash for Your New Password
To generate an MD5 hash for your new password, you can use an online tool like MD5 Hash Generator. Here’s how:
- Go to the MD5 Hash Generator website.
- Enter your new password into the text field.
- Click Generate to create the MD5 hash.
- Copy the generated hash.
Back in phpMyAdmin:
- Paste the MD5 hash into the
user_pass
field. - Scroll down and click Go to save the changes.

Your password has now been updated. You can log in to WordPress using the new password you just set.
Step 5: Clearing the Cache (If Necessary)
If you’re using a caching plugin or your host provides server-side caching, you may need to clear the cache after making changes to your username or password. This ensures that the changes take effect immediately.
Conclusion
Manually changing your WordPress username and password from the database is a simple but powerful method to regain access to your site when traditional methods fail. Whether you’re locked out, need to enhance security, or recover from a hack, this guide provides a clear and effective solution.
If you found this guide helpful, be sure to check out more of our WordPress tips and tutorials on our blog.