How To Reset the WordPress Administrator Password from phpMyAdmin

Rest WordPress Admin Password

Normally if you forget your password, you can easily use the WordPress password recovery feature to reset the password by e-mail. However, if this option is unavailable because for some reason if your site is hacked, or something else, you are no longer able to login to your admin panel.

In this article, we’ll walk you through how to manually reset the WordPress administrator password through the database with phpMyAdmin.

Things To Do Before Making Any Changes To a Database

Before you make any changes to a database, it is highly recommended to always make a WordPress database backup.

And for some instance, if you running multiple WordPress installations hosted on a single account, chances are a couple of databases are also in place. Thus, you must check your WordPress database name.

The best place to look for is your wp-config.php which is located in your root WordPress Directory.

Resetting the WordPress Administrator Password from phpMyAdmin

Now that you have figured out the database name, it’s time to actually reset the WordPress admin password in the database.

The first thing you need to do is log in to cPanel.

Then, head over to the Databases section (ours is “database tools”, as we’re hosted in Bluehost, it’ll look differently than yours) and click phpMyAdmin.

cPanel phpMyAdmin section

Once you are in phpMyAdmin, in the left-hand pane look for the WordPress database you found in your wp-config.php and click on it.

A list of tables in that particular database appears.

Method 1

Look for the table named wp_users click on it and then click on the Browse tab. This will list all current users added on your website.

Choose the admin user from the list and then, click on the Pencil (Edit) icon to reset the Password.

Resetting Administrator Password in phpMyAdmin

You will then see a field that looks something like the image below:

Resetting Administrator Password in User_Pass Field

You will need to edit the Value of the field, user_pass.

To do so, you would need to use one of the many MD5 Hash generators online to generate your password. One of our favorites is the “md5 Hash Generator” by Miracle Salad.

Simply type your password in it and click the MD5 button to generate hash password as in the image below.

MD5 Hash Generator Online

Copy and paste the code into your phpMyAdmin field and click Go to save changes.

Method 2

On the other hand, you can also do change the password by executing an SQL query in your database.

Simply click on the SQL tab.

Then, copy and paste the following statement into the SQL query text box.

UPDATE wp_users SET user_pass = MD5( 'new_password' ) WHERE wp_users.user_login = "admin_username";

Resetting Administrator Password Using SQL Query

Replace new_password with the new password, and replace admin_username with the administrator’s username.

Click on Go to save changes.

You have now successfully changed your WordPress Password from phpMyAdmin with both methods. Whichever method you choose, it will give you the same result.

Note: It is highly recommended to always use a strong password. A Strong Random Password Generator can help.

That’s all! We hope this article helped you learn how to change your WordPress administrator password from phpMyadmin. You can also check our guide on different ways to secure WordPress website from hackers.


2017-09-06T01:36:04+00:00

About the Author: Rodney Lacambra

Rodney Lacambra is the founder and editor of WPMakeSite Blog and is a freelance WordPress Developer by profession. Learn more about him here and connect with him on Facebook, Twitter, Google+ and LinkedIn.

2 Comments

  1. Vishal May 16, 2017 at 11:55 pm - Reply

    Yes it’s working for me. Can you please suggest me one thing, which is the best plugin for a slider?

Leave A Comment

14 Shares
Share14
Tweet
+1
Share
Pin
Stumble

Wait! Don't go just yet.

Get more WordPress tips only shared with email subscribers. Just enter your name and email address below.

This information will never be shared for third part