Skip to content

How to Change a WordPress Password in phpMyAdmin

If you have lost access to your WordPress admin area, you can reset your password directly in the database using phpMyAdmin. This is one of the quickest ways to regain access to your website.

ResetPassword
DatabaseAccess
RestoreLogin

When Would You Use This?

Forgotten Password

Reset an administrator password when you cannot log in.

Password Reset Emails Not Working

Useful when WordPress password reset emails are not being received.

Locked Out of WordPress

Regain access when all other login methods have failed.

Before You Start

Know Your Database

You will need access to your hosting control panel and phpMyAdmin.

Backup First

Always create a database backup before making any changes.

Locate Your User Account

You will need to know the WordPress username or email address.

Step-by-Step Instructions

Open phpMyAdmin
Select Database
Find Users
Edit Password
Save

Step 1: Open phpMyAdmin

Login to your hosting control panel and open phpMyAdmin.

Step 2: Select Your WordPress Database

Choose the database used by your WordPress website from the left-hand menu.

Step 3: Open the Users Table

Locate the table:

wp_users

Some websites use a custom table prefix such as:

abc123_users

Step 4: Edit the User

Find the administrator account and click Edit.

Step 5: Update user_pass

Locate the field:

user_pass

Enter your new password.

Step 6: Select MD5

From the Function dropdown choose:

MD5

Then click Go or Save.

Example

Password Change Example

user_login: admin

user_pass:
MyNewPassword123

Function:
MD5

Save the changes and WordPress will automatically convert the password to its newer secure hashing method after your next successful login.

Alternative Method (SQL Query)

Run SQL Directly

UPDATE wp_users
SET user_pass = MD5('MyNewPassword123')
WHERE user_login = 'admin';

Replace the username and password with your own values before running the query.

Common Problems & Fixes

Can't Find wp_users

Your site may use a custom table prefix. Look for a table ending in:

_users

Still Cannot Login

Confirm you updated the correct user account and database.

Wrong Database

Check the database name inside:

wp-config.php

Account Locked

Security plugins may temporarily lock administrator accounts after multiple failed login attempts.

Security Tips

Use Strong Passwords

Use a unique password with letters, numbers, and symbols.

Enable Two-Factor Authentication

Add an extra layer of security to administrator accounts.

Review Admin Users

Remove old administrator accounts that are no longer required.

Recommended Plugin

MyFast Login Guard

Once you've regained access to WordPress, consider improving login security with MyFast Login Guard.

  • Rename wp-login.php
  • Block brute force attacks
  • Monitor login attempts
  • View security logs
View Plugin →