WordPress Password lost and email not sending

wordpress admin password reset phpmyadmin

WordPress Password Reset Email Not Sending

In this tutorial we are going to solve an issue which we faced recently , but because we are aware of technical things so it takes little time to solve it. Lets share this problem and solution with our readers so they too can solve if ever they face such problem.

What was the problem ?

Our VPS was not able to send emails and we lost password of admin control panel. So there was only two solutions left to us is either we hit and trial all the passwords we know and waste our lot of time. Or to find a solution to reset password.

So one solution came in mind is to get access to phpMyAdmin panel and directly enter password in wordpress admin account.

Its easy ?

Well it was easy to get access to phpMyAdmin but problem comes when we saw mySQL table ” wc_users ” of account where we find password is not using regular encryption method , mostly php developers are using password_hash encryption.

So we started searching the encryption method of wordpress using these days. And found the information that wordpress since they drop MD5 encryption method developed their own PasswordHash class. Which is in ” class-phpass.php ” inside folder ” wp-includes “.

Now what ?

So we copy that class file and make a php code to develop new password for us and replace that password in mySQL table ” wc_users “.

Here is the php code which we use to generate new password.

require 'class-phpass.php';

$posted_password = 'MyNewPassword';

$wp_hasher = new PasswordHash(16, true);   // 16 digit hashing password
$pass = $wp_hasher->HashPassword( trim( $posted_password ) ); //$posted_password is your password

echo $pass;

So in our phpMyAdmin panel we go to mySQL table ” wc_users ” and edit admin account and change the password.

editing wordpress users table inside phpmyadmin

In editing page change password with newly generated password.


editing wordpress users table inside phpmyadmin change password

Scroll down and click GO button to save the result.

That’s it. Now you are ready to enter Admin Control Panel.

Leave a Reply

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

  +  53  =  59