Reset a WordPress password using phpMyAdmin

Losing access to your WordPress site can be stressful. Particularly if it's a result of a site being hacked, however, don't panic!

This guide will show you how to update your WordPress user password using phpMyadmin.

Warning: You will be directly editing your database. If you aren't comfortable with this, we strongly recommend contacting your developer for assistance.

Finding your database name:

Before we can edit the database, we will first need to find out which database we need to modify.

If you're only hosting a single website, you can skip this step, otherwise, follow the steps below:

  1. Log into cPanel
  2. Navigate to the "Domains" section and click on the "Domains" option

  1. Find the domain name for your website and click the link to go to the document root for that site. In this case it will be public_html

  1. Find the wp-config.php file

  1. Right click on wp-config.php and select "Edit"

  1. You will recieve a warning, click "edit" to continue.

  1. Look for the "DB_NAME" section, here you can find the name of your database. In this case it is "helpdocsiteskhos_7".

Changing a password in phpMyAdmin:

Once you have your database name, follow the steps below to update the password.

  1. Login to cPanel
  2. Navigate to the "Databases" section and click "phpMyAdmin"
  1. On the left hand side you will see a list of databases, select your database to open a list of tables.
  1. Search for the wp_users table
Note: The wp_ database prefix will be different depending on your cPanel username, however it will always end with _user.
  1. You will now see a list of WordPress users. Find the email address relating to the user you wish to update the password for and click "Edit"
  1. Find the "user_pass" section and enter your new password in the box in plain text.
  1. Click on the blank "Function" dropdown next to the password and select "MD5".
  1. Once you have entered the password and selected "MD5", click the "Go" option at the bottom of this screen.
  1. Done!

You've now updated your wordpress password and you should be able to login to your wordpress dashboard as normal.

How did we do?

Powered by HelpDocs (opens in a new tab)
© Krystal Hosting Ltd 2002–