How To Reset the WordPress Administrator Password from phpMyAdmin

Last updated on

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, I’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 (mine is “database tools”, as I am hosted in Bluehost, it’ll look different than yours) and click phpMyAdmin.

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.

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.

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";

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! I hope this article helped you learn how to change your WordPress administrator password from phpMyadmin. You can also check this guide on different ways to secure WordPress website from hackers.

Our Most Popular Post Right Now!
Disclosure: Some of the links on this site are “affiliate links”, which allow me to earn a small referral payment if you choose to purchase the product or service.

2 Responses

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

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recommended Book: WordPress All-in-One For Dummies
Subscribe to Blog via Email
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
This field is for validation purposes and should be left unchanged.

Don’t worry, we hate spam as much as you do.
Do you need help setting up WordPress?
I can help you with blog and site setup, full website build, performance & security, maintenance and support, and many more.
Recommended Web Hosting