How to Reset a WordPress User Password using phpMyAdmin

Last updated on October 18th, 2014 by Robert Abela. Filed under WordPress Security Tutorials & Tips

There are several reasons why you would need to reset a WordPress password. If your website ever gets hacked, or for some reason you cannot login back to your website, the only way back in is to reset the WordPress password.

There are several methods you can use to reset a WordPress password for a specific account. You can reset a WordPress password using FTP, or as explained in this article, you can reset WordPress password using the phpMyAdmin web interface. Follow the three easy steps in this WordPress tutorial to reset a WordPress password within a minute and gain back access to your WordPress blog or website.

Step 1 – Connect to WordPress Database with phpMyAdmin

To connect to the WordPress database with phpMyAdmin, login to your hosting provider cPanel. Scroll down to the Databases section and click on the phpMyAdmin icon which is highlighted in the below screenshot.

databases section in the cPanel - Select phpMyAdmin

Step 2 – Select the WordPress database and Users table

Once logged in, select the WordPress database from the list of databases listed in the left hand side column in the phpMyAdmin web interface. If you have multiple databases or you are not sure which is the right WordPress database, you can find the database name from the wp-config.php file. The wp-config.php file can be found in the root directory of WordPress and the WordPress database name can be retrieved from the following line:

define('DB_NAME', 'YOUR_DATABASE_NAME');

Once you click on the WordPress database you will see a list of tables. If you have not renamed the table prefixes, all the table names will start with the ‘wp_’ prefix.

WP White Security Security Tip: Rename the WordPress database prefix to protect your WordPress from zero day vulnerabilities.  If you are not familiar with MySQL and under the hood WordPress technicalities we can do it for you.

Click on the wp_users table and click on the Browse tab (highlighted in the below screenshot) to browse the content of this table, i.e. the list of WordPress users and their settings.

phpMyAdmin table properties menu

If you only have one WordPress user, the table will only contain one row as seen in the below screenshot.

List of WordPress users in wp_users table in phpMyAdmin

Step 3 – Reset the WordPress password

To modify a WordPress user from phpMyAdmin, such as changing the user’s password, click on the Edit (pencil icon) button. As you can notice from the below screenshot, you can edit any of the user’s property once in this edit mode. The user password is stored as a long string of random characters (MD5 hash) in the user_pass column as highlighted in the below screenshot. WordPress stores the password in such format for security reasons.

WordPress user details and properties in phpMyAdmin

You can simply start typing the new password in the value section of the user_pass column. Once you specify the new password (Pass123! In the below example) select MD5 from the Function column drop down menu for the user_pass column so the password is stored using MD5 checksum and not plain text.

specify new WordPress password for WordPress in phpMyAdmin and store in MD5

Click on Go button to save the new password. Congratulations. You have just reset a WordPress user password using phpMyAdmin.

WordPress Hosting, Firewall and Backup

This Website is:

One comment

Lionel 10/06/2013

This was really helpful, and very clear. Thanks for providing this information.

Cheers
Lionel

Leave a Reply

Your email address will not be published. Required fields are marked *