Article From:https://www.cnblogs.com/ricksteves/p/9688246.html

WordPressFour effective ways to forget password and retrieve login password.

PS:20170214To update,Thanks to SuperDoge’s method, log into phpMyAdmin, select your own database from the left, then click on the SQL tab above, and execute the following command:

1
UPDATE `wp_users` SET `user_pass`='$P$BWZhQxx/R9UCBgECUhxsV0EKfqfEh31' WHERE `user_login`='freehao123'

Then use user name: freehao123, password: admin login. Note that if your username is something else, please replace it in the above command and log in using this username.

The simplest way to retrieve the WordPress password is to retrieve the background directly by email.

1、Forget the WordPress login password, directly use the WordPress login background “password back”, enter your administrator mailbox, you will receive a reset password mail, click the reset link, set a new password.

WordpressForget the password and get back

2、Note that the newly purchased Godaddy hosts now use the Cpanel panel, and there are PhpMyAdmin administration links in the database.

WordpressForget password to see Cpanel address

3、After entering PhpMyAdmin, click the wp_users table.

WordpressForget the password and find the table

4、Click again to modify user parameters. (Note: user_login is the login name, the default is admin, and if you have changed the user name before, the other one is displayed).

WordpressForget the password edit parameter

5、Here we change the user_pass value into: 5d41402abc4b2a76b9719d911017c592, execute and save.

WordpressForget password execution save

6、When you’re done, you can use the password: hello to log in to your WordPress, and remember to change the password immediately after logging in to the WordPress background.

WordpressForget the password, use the new login

Three, the fastest way to modify the WordPress password is to execute the SQL command.

1、Go to the SQL execution command page of PhpMyAdmin and execute the following commands:


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

2、123456It’s your new WordPress password. Admin is the administrator account. After executing the command, you can login to WordPress with the new password.

WordpressForget password, execute SQL command

Four. The most convenient way to set up the new WordPress password is to reset the password with PHP file.

PS:2014Updated in March 7th,Thanks to arefly.Com blogger for providing a new PHP file for resetting WordPress passwords: WordPress Recovery password PHP file download address. Upload this file to the root directory of your website and enter all MYSQL information and needs about your site.To change the WordPress account and password, click the “reset password”. The PHP tool will try to delete automatically after use, but if the deletion fails, remember to delete the file yourself to ensure the security of the site.

New PHP file ” reset “WordPress password.

1、If you don’t have access to a database management system, or you don’t want to use PhpMyAdmin so much trouble, try resetting the WordPress password with a PHP file.

2、Copy the following code and save it as wppw.php file. (code from: https://www.yiduqiang.com/wordpress-password-changes.html)


<?php
/*Your database server address is generally maintained by default * /$servername = "localhost:3306";/ * database username * /$phpMyadminUser = "root";/ * database password* * /$phpMyadminKey = "yiduqiang";/ * database name * /$phpMyadminName = "test";/*wordpress data form prefix * /$QZ ="Wp_";/ * the new WordPress password you want to set is * /$NewKey = "yiduqiang";* you need to set the user name of the new password * /$wordpress_User = "yiduqiang"";><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1 Transitional//EN" "https://www.w3.org/TR/"Xhtml1/DTD/xhtml1-transitional.dtd ">< HTML xmlns= "https://www.w3.org/1999/xhtml" >< heaD>< meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" />< title> worDpress password recovery tool < /title>< /head>< body><? PHPError_reporting (0);If (! Mysql_co)Nnect ($servername, $phpMyadminUser, $phpMyadminKey){Echo "sorry, database link error. < br /> ";}Else{Echo "database link is successful. < br /> ";Mysql_select_db ($phpMyadminName, mysql_connect ($servername)($phpMyadminUser, $phpMyadminKey));If (? Mysql_query ("update".$QZ. "users set user_pass='".Md5 ($)NewKey). "" where user_login='".$wordpress_User." ".{Echo "sorry, failed to change the password. ";}   Else{Echo "successfully modified password. ";}}>< /body>< /html>

3、Or download my saved wppw.php file directly: WordPress reset password PHP file. Open the wppw. PHP file, change the database username, password, name, etc. to yours, and the new password for WP.

WordpressForgot password changed connection database

4、Note in particular: Some hosts may have database Host addresses that are not the default Localhost, such as Godaddy’s hosts, which are a series of URL addresses.

WordpressForget password, notice database host

4、Upload the wppw.php file to the root directory of your website in FTP mode.

WordpressForgot password was uploaded to the root directory

5、Then open: https:// domain name /wppw.php, the page will prompt you to change the password successfully. If you are prompted for a database connection error, please go back and check carefully for any errors in the database section of wppw. php.

WordpressForgot password modification success

Five, WordPress retrieve password method summary

1、Using WordPress’s own password retrieving function is the easiest and most convenient. If the host does not support the PHP mail () function, you can use SMTP instead. Method: WordPress comments reply to mail notifications.

2、WordpressPHP files uploaded to reset password should be deleted after use, so as to avoid potential safety hazard. Before using PhpMyAdmin to execute SQL command, remember to backup data, so as not to fail to cause data loss.

Leave a Reply

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