Grow your CSS skills. Land your dream job.

Last updated on:

Reset Admin Password in Database

Forget your admin password and don't have access to the email account it's under? If you can get access to phpMyAdmin (or anything you can run mySQL commands), you can update it there.

UPDATE `wp_users` SET `user_pass` = MD5( 'new_password_here' ) WHERE `wp_users`.`user_login` = "admin_username";

Just replace new_password_here with the new password and admin_username with the real admin accounts usename.


  1. MD5 is outdated, I recommend sha1

    • That’s cool, but they are stored in the WordPress database as MD5 I’m pretty sure, so I wouldn’t rock the boat there.

  2. It is also pretty easy to perform an update query on the email address to change it to an active email. Then you can use the forgotten password interface.

  3. Permalink to comment#

    Hm, WordPress definitivly doesn’t store the passwords in md5 anymore. No chance, it uses the sha 1…

  4. Permalink to comment#

    Thanks Chris,

    Been looking for this


  5. WordPress now uses PHPass for passwords, then this trick wont work any more, I guess.

Leave a Comment

Posting Code

  • Use Markdown, and it will escape the code for you, like `<div class="cool">`.
  • Use triple-backticks for blocks of code.
      <h1>multi-line block of code</h1>
      <span>be cool yo.</span>
  • Otherwise, escape your code, like <code>&lt;div class="cool"&gt;</code>. Markdown is just easier though.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".