WordPress forget the background login password solution

After the installation of wordpress forget to record the default password or use the wordpress for some time after the forgotten password how to do? CMS concentration camps sorted out six kinds of wordpress forget the password solution, recommended to the owners.
1, reinstall WordPress. We do not recommend this method, reinstall the installation file to download more trouble.
2, use the password recovery function. WordPress itself supports e-mail password recovery function, if the administrator account e-mail is valid, in the background login interface, click “forget the password?” Link, enter the correct e-mail address, you can receive a reset password with the message.
3, the WP directory under the wp-config.php file to delete, and then re-visit the site, which will allow you to re-install the last step, so you can get a new password.
4, log phpMyAdmin, find WP database wp_users table, where you can see the default user admin, its password is encrypted. At this time, we can modify this data, find the user_pass this domain, put it a long string of data deleted, write your password, such as 123456. At this point, you will see a function drop down box, select it as MD5. This is to put your password MD5 algorithm encryption, and then save. This way, through your domain name / wp-admin visit to the management of the entrance, with this password can be landing.
5, through the SQL statement to change the password. Log in to phpMyAdmin to 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 to retrieve the password. PHP method in the final analysis is also the way SQL query changes, but to provide a user interface. Copy and save the following code as the password-resetter.php file, upload it to the WordPress root directory, and then run the file and enter the password to reset it.
<? php
// password resetter
include (“wp-config.php”);
include (“wp-blog-header.php”);
if (empty ($ _ POST [’emergency_pass’])) {
?>
<form method = “post”>
set admin password: <input name = “emergency_pass” type = “password” />
<input type = “submit” />
</ form>
<? php
} else {
$ sql = “UPDATE”. $ wpdb-> users. “‘SET user_pass ='” .md5 ($ _ POST [’emergency_pass’]). ” WHERE User_login = ‘admin’ “;
$ link = $ wpdb-> query ($ sql);
wp_redirect (‘wp-login.php’);
exit ();
}
?>