Last updated September 28, 2016. Created on January 10, 2006.
Edited by batigolix, Michael-Inet, darol100, J. Cohen. Log in to edit this page.

There are several methods to recover the Drupal administrator ("user 1") password. Drupal console and drush provide commands to recover and manage users passwords.

Recover password with DrupalConsole

DrupalConsole offers several ways of recovering the administrator's password.

Generate login-link

DrupalConsole can generate a one-time login link.

drupal user:login:url

Reset password

drupal user:password:reset

Clear login failed attempts for an account.

drupal user:login:clear:attempts

Request new password via e-mail

You can reset your password by requesting a new password at http://www.example.com?q=user/password.

Recover password with Drush

Drush offers several ways of recovering the administrator's password.

Generate login-link

Drush can generate a one-time login link.

drush uli

Reset password

drush upwd --password="givememypasswordback" "admin"

(where "admin" is the user name)

Change password with a database query

Drupal 7

Update administrator password via sql-query in Drupal 7.

Drupal 6 and below

Execute the following query on the Drupal database where 'givememypasswordback' is your new password. You will need to log into your database using phpMyAdmin or another tool.

UPDATE users SET pass = MD5('givememypasswordback') WHERE uid=1;

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.