How to change the password if you forget your wordpress password?
1. WordPress built-in password retrieval method
If the email address of your admin account is correct, then follow the normal retrieval method For the password step, click "Forgot Password?" on the WordPress login page and enter admin or email address. Then, you will receive a password reset email, click the restart link inside. Later you will receive another email containing your username and Password email.
This is the same as the steps for all WordPress users to retrieve their passwords. The other 4 methods we introduce below mean that you may not have modified the email address of the admin account. You also The password cannot be accepted.
2. Change the WordPress password by executing the Mysql statement
Use a tool such as Phpmyadmin to log in to your database management and execute the following statement:
"update user set password=password("new password") where user='username';"
You can update your WordPress password.
3. Modify WordPress password through PHP file
Create a new pwd.php file and add:
echo md5('your password');
Upload to the root directory of the host, execute http://your domain name/pwd.php, and then connect to your database for execution.
update wp_users set user_pass='Execute the string displayed by pwd.php' where user_login='admin';
OK, now you can use the password you set to enter the administrator account.
4. Retrieve password through password-resetter file
Download: password-resetter
Usage:
Replace password -Resetter.zip Unzip;
Upload password-resetter.php to the WordPress root directory (Note: This is not a WordPress plug-in!)
Run http://your domain name/password-resetter. php
Enter the administrator password you want to reset after Set admin password:! Then click Submit Query Content
Remember to delete password-resetter.php on the server after retrieving the password (otherwise it will be used by others)
5. By modifying MD5 Value Retrieval of WordPress Password
WorePress automatically gives the password after installation. I always log in automatically, so I forgot the password a month later. WP uses MD5 to save passwords, so passwords are irreversible. Thinking of using the database in the background, you can retrieve the password through the database, log in to phpmyadmin, and then as shown in the figure, the first step after logging in is to select the database. Generally, virtual hosts have phpmyadmin.
Change the MD5 password to: "5d41402abc4b2a76b9719d911017c592 ″
Then return to the WordPress login page and log in using the password “hello”.
Compare, if your email settings are correct, then of course the first method is the most convenient. If you have control of the database, then the fifth method is the most convenient. If not To control the database, the fourth method is more convenient.
For more WordPress technical articles, please visit the WordPress Tutorial column!
The above is the detailed content of How to change WordPress password if you forget it?. For more information, please follow other related articles on the PHP Chinese website!