WordPress knowledge sharing

Several Methods for WordPress Forgot to Retrieve Login Password

There are often Madaha user conferences Forgot Wordpress background login password At this time, there are several ways to recover and save the matter. In this article, Lao Wei summarized several common methods to retrieve the WordPress login password, hoping to solve the urgent problem.

Retrieve WordPress login password directly by email

The password recovery function is provided on the WordPress login page. After entering the administrator's mailbox, you will receive an email to reset your password. Click the reset link to set a new password.

However, there are two prerequisites for using this function: one is that when installing Wordpress, you fill in a real email address of your own, and the other is that the server can send an email to reset your password, either of which is indispensable, or you will fail to retrieve your password.

PhpMyAdmin Modify Password MD5 Value

Log in to phpmyadmin, find wp_users in the database, and click to find them on the right, as shown in the following figure:

Modify the value of user_pass to 5d41402abc4b2a76b9719d911017c592, save and execute.

You can click "Edit" or double-click the "Password" area to change the password.

Tip: The password here is encrypted by md5 processing of the real password.

Then use the password hello to log in to the WordPress background. Remember to change the password in time after entering.

Execute SQL command to quickly change password

Also log in to database management with phpmyadmin, click the SQL execution command page on the right, and execute the following command line

 update wp_users set user_pass=md5("hello") where user_login='admin';

The account password of the login admin is changed to hello. In actual operation, you should replace it with your own login name.

PHP file reset password

The methods mentioned above have complex operations on the database. If you are a new 18k gold user and are afraid of breaking the website, you can also try the following php file to reset your password.

<? php
include(“wp-config.php”);
if (empty($_POST[‘resetpwd’])) {
?>
<form method=”post”>
Enter new password:
<input name=”resetpwd” type=”password” />
<input type="submit" value="Submit"/>
</form>
<? php
}else{
$sql = “UPDATE “.$wpdb->users.” SET user_pass = ‘”.md5($_POST[‘resetpwd’]).”‘ WHERE User_login = ‘admin'”;
$link = $wpdb->query($sql);
wp_redirect(‘wp-login.php’);
exit();
}
?>

The above code is saved to a new text document, and saved in php format. Upload it to the root directory of the website for execution. The page prompts you to enter a new password, and then you can use the new password to log in to the WordPress background.

Tip: You must delete this php file immediately after use to avoid security problems.

The above four methods can quickly modify the WordPress login password, but we still need to fundamentally eliminate this problem. When installing WordPress, we should record the login address, account number, password and other related information, so as not to make trouble for ourselves.

Like( two )
Article name: Several Ways to Find Forgot Login Password in WordPress
Article link: https://www.vpsss.net/19715.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.