.

Easily Reset Your WordPress’s Admin Pasword

Posted by admin | Posted in Blog, Wordpress | Posted on 16-05-2009 | Views: 100

0

How often are you change your WordPress admin’s password? What happen if you forgot your WordPress admin account password? Do you need to delete the databse and recreate it?

Although you cannot recover your current admin’s password, but it is not neccessary to delete the database and recreate it. You can simply replace it with a new password. Here, i will show you a very simple method to replace the password.

First of all, open your favorite code editor, or simply Notepad if you don’t have any. Then, place these code into the file and save it as reset.php.

  1. <?php   
  2. require(‘./wp-blog-header.php’);   
  3.   
  4. global $wpdb;   
  5. $password = ’12345′;    //change this to your desired password.   
  6. $admin_login = ‘admin’;        //your Wordpress admin username.   
  7.   
  8. $wpdb->query(“UPDATE $wpdb->users SET user_pass = MD5(‘$password’) WHERE user_login = ’$admin_login’”);   
  9. ?>  

You can replace the ‘12345‘ with your desired password and ‘admin’ with your admin account username. After that, upload the reset.php file to your WordPress root folder.

Then, go to your browser and type “http://your-domain.com/reset.php“. Done! You can now login with your new admin password.

Note: Please delete the reset.php file from the server after you reset your password.

Related Posts with Thumbnails

Popularity: 1% [?]

No Tag

Posts that you might like:

Post a comment