Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to reset a WordPress password with phpMyAdmin

This guide shows you how to set a new WordPress admin password when the usual reset email does not work.

Databases2 min read14 steps8 screenshots

Why use phpMyAdmin?

WordPress keeps its users and passwords in a database. A database is like a filing cabinet for your site's data. phpMyAdmin is a web tool that lets you open that cabinet. If you cannot receive the reset email, you can change the password directly.

Warning: You are editing live data. Take a backup of the database first. See our guide on backing up a MySQL database.

Steps

  1. Log in to your client area. Open your hosting service and log in to cPanel.
  2. Under Databases, click phpMyAdmin.
  3. In the left list, click your WordPress database. Not sure which one? Open wp-config.php in File Manager and look for DB_NAME.
    Click File Manager on the cPanel dashboard
  4. Find the table that ends in _users, such as wp_users. Click it.
  5. Click the Browse tab to see the users.
    view the wp-config.php file
  6. Find your user. Check the user_login column.
  7. Click Edit next to that row.
  8. Find the row named user_pass.
    database file
  9. In the Function drop-down beside it, choose MD5.
  10. In the Value box, delete the old text. Type your new password.
  11. Scroll down and click Go.

MD5 turns your password into scrambled text, called a hash. WordPress accepts it and then upgrades it to a stronger scramble the first time you log in.

Log in

  1. Go to your site's /wp-admin address.
  2. Use your user name and the new password.
  3. Go to Users, then Profile, and set a new strong password.

Using an SQL query

You can also open the SQL tab and run:

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

This sets a new password for the user named admin. Change the table prefix, the password and the name to match yours.

Tip: Your table prefix may not be wp_. Use the prefix you see in the table list.

Locked out for another reason? Open a support ticket.

Quick recap

  • Open phpMyAdmin and your WordPress database.
    Accessing phpMyAdmin
    select the database of your WordPress website
  • Edit the _users table, in the user_pass row.
    users table
    set the password
  • Choose MD5 in the Function box and type the new password.
    select MD5
  • Click Go, then log in and change it again.
  • Back up first.