Joke Collection Website - Blessing messages - What to do if you forget your WordPress background password? How to easily retrieve your WP password?

What to do if you forget your WordPress background password? How to easily retrieve your WP password?

1. Reinstall WordPress. We do not recommend this method. It is troublesome to download the installation files for reinstallation.

2. Use the password retrieval function. WordPress itself supports the password retrieval function by email. If the email of the administrator account is valid, click the "Forgot your password?" link on the backend login interface, enter the correct email address, and you will receive an email containing a password reset.

3. Delete the wp-config.php file in the WP directory, and then visit the website again. This will allow you to re-do the last installation step so that you can get a new password.

4. Log in to phpMyAdmin and find the wp_users table of the WP database. Here you can see the default user admin, whose password is encrypted. At this time, we can modify this data, find the user_pass field, delete its original long list of data, and write your password, such as 123456. At this time, you will see a drop-down box for the function, select it as MD5. This is to encrypt your password with the MD5 algorithm and then save it. In this way, access the management portal through your domain name/wp-admin, and use this password to log in.

5. Change the password through SQL statements. Log in to phpMyAdmin, enter the WordPress database and execute the following SQL statement:

UPDATE wp_users SET user_pass = MD5('PASSWORD') WHERE wp_users.user_login ='admin' LIMIT 1;

6. Use PHP password retrieval. In the final analysis, the PHP method is also a way to modify SQL query statements, but only provides a user interface. Copy and save the following code as a password-resetter.php file, upload it to the WordPress root directory, then run the file and enter the password to reset it.