featured-image-password

If you’ve ever been locked out of a WordPress site because the password was lost or changed or somehow corrupted, no need to worry. There’s an easy way to reset it in the database.

As most people these days work with a webhost that uses Cpanel, we’ll use Cpanel in this tutorial. If you don’t have Cpanel, then simply find your way into your database using the method recommended by your host.

 

 

Log in to Cpanel and Access phpMyAdmin

 

You should be able to log in to your Cpanel by simply typing cpanel at the end of your domain name in your browser. For example:

mysite.com/cpanel

This should automatically redirect you to the URL http://mysite.com:2082. Simply remembering to put "cpanel" at the end of your domain is much easier, however.

Once you’re logged in, find the phpMyAdmin icon and click on that.

phpMyAdmin

 

 

 

Find Your Database

 

If you only have one database, you can skip this section and go to the next section.

If you have more than one database, then you will need to find out which one applies to the site you’re working with.

In order to do that, go back out to your Cpanel homepage and look for the File Manager icon and click on that.

file-manager

You will probably get a popup that gives you a few different options.

The default is probably fine here. You’ll just want to make sure you’re going to your Web Root (public_html/www).

So when that’s set, click Go.

pop-up

 

Once inside your file manager, you’ll see a list of your WordPress files. Find the file called wp_config.php.

Select the wp_config.php file, and then click on the View button at the top.

wp-config

Once inside this file, you should be able to find the name of your database near the top of the page.

In this case, the database is named mysite_wrdp1.

database-name

 

Find User and Reset Password

 

One you’re inside your database area, find the wp_users link and click on that.

wp_users

Find the name of the user you want to change the password for, and click on Edit.

find-user

Fill in your new password in the user_pass box on the right, and then on the left use the pulldown menu to select MD5. Using MD5 will encrypt your password.

Then hit the “Go” button at the bottom.

write-password

After hitting the “Go” button, you should be redirected back to where you started, and you should see your new password encrypted.

new-password-encrypted

 

At that’s it. You should be able to log in with your new password now.