Networknet archive Blog

WordPress: Reset the admin password

Originally published Last updated 2 comments

I lost the admin account password for a WordPress site. There are several ways to reset a WordPress password.

These are the steps I used to reset the "admin" account password in WordPress 2.7.1.

Reset the password

  1. Open a Linux shell.
  2. Generate an MD5 password hash:
    Shell1 line
    1
    
    echo -n password | md5sum
  3. Go to phpMyAdmin and open your WordPress database.
  4. Run the following SQL, replacing the database name with your own:
    SQL1 line
    1
    
    UPDATE 'name-your-database'.'wp_users' SET 'user_pass' =' 5f4dcc3b5aa765d61d8327deb882cf99' WHERE  'wp_users'.'ID' =1 LIMIT 1 ;
  5. You can also run mysql, select the database with "use name-your-database;" and run the UPDATE statement above.

Reference

2 comments

Comments from the original WordPress site, kept read-only.

  1. Andy

    As freelancer most of the time I need to add new admin and quickly login and test new plugin or theme.

    I use addnewadmin script. http://hecode.com/addnewadmin

    Simply copy the addnewadmin.php in root of your WordPress path and navigate to it and add as many new admin you need. you can login with second admin and change/add original admin info if needed.

  2. Prasad

    Nice article.
    I am also writing some articles on http://www.wordpressstop.com once visit my site and get lot of stuff regarding to Wordpress.