How to Recover a lost WordPress Password on Hepsia Control panel

It doesn't matter whether you are using cPanel or Hepsia, our in house Control panel. As long as you are able to locate phpMyAdmin, you will be good to go.

In WordPress, there are many different ways you can use to recover your lost password. (Where normally, the easiest way to do so is through the “Lost your password?” link on the main login page for your blog or website.)

However, there are certain times (especially if your email isn’t working correctly) that you may have to take a different approach to reset your password.

Listed below are just some of the methods you can follow to accomplish your goal.


Using the Lost your password link on the login screen

WordPress makes it super easy for users to reset their admin passwords.
You can do that by simply going to the login page screen and clicking on the "Lost your password" link as displayed below:



Once you click on it, it will take you to password reset page where you can enter your username or email address to reset the password. After that, WordPress will send a password reset link to the email address associated with that user account.

But if for some reason you don’t have access to the email address, or your WordPress site fails to send an email, then your other option would be to reset it through the database with phpMyAdmin.


Resetting the password through the database with phpMyAdmin

The easiest way to reset your WordPress password directly in the database is using phpMyAdmin. Below are the simple steps you will need to follow:

Step 1:
Login to the Control panel dashboard of your WordPress hosting account;

Step 2:
Click on the MySQL icon under the database section.



Step 3:
Then you need to click on the phpMyAdmin icon similar to the one highlighted below.



This will launch the phpMyAdmin app where you will need to select your WordPress database.
Once you have selected the database in question, click on "+" sign to expand it.



You will now see a list of tables in your WordPress database. From there you will need to look for the "{table-prefix}_users" table in this list and click on it or "Browse" link next to it if you are using cPanel.

After that, you will see the rows in your WordPress users table. Go ahead and click on the edit button next to the username where you want to change the password.



Note:

Table names in your WordPress database may have a different table prefix than the one we are showing in our screenshot.

PhpMyAdmin will show you a form with all the user information fields.

You will need to delete the value in the user_pass field and replace it with your new password. Please also note that for a stronger password we recommend using a password generator app like the one at SeoPrimeTools Password Generator. Under the function column, select MD5 from the drop down menu and click on the Go button located at the bottom.



Your password will be encrypted using the MD5 hash and then it will be stored in the database. Once everything is set, you should now be able to login to your WordPress as the administrator by using the new password.

If it doesn’t work, check that you’ve followed these instructions exactly, otherwise, you may have to reset your password via FTP.


Resetting the password via FTP

  1. Login to your site via FTP and download your active theme’s functions.php file.
  2. Edit the file and add the following code to it, right at the beginning, after the first <?php:
wp_set_password( 'password', 1 );


Enter your own new password for the main admin user. The “1” is the user ID number in the wp_users table.

  1. Upload the modified file back to your site and try to login to your WordPress account.
  2. Once you are able to login, make sure to go back and remove that code from functions.php file. It will reset your password on every page load until you do so.

Was this tutorial helpful to you? If so, please share it with your colleagues by clicking the icons below:

Share This on!