Last updated 9 November 2016. Created on 10 January 2006.
Edited by kbrinner, batigolix, Michael-IDA, darol100. Log in to edit this page.

There are several methods to recover the Drupal administrator ("user 1") password. DrupalConsole and drush provide commands to recover and manage users passwords. If you do not use DrupalConsole or drush you can recover the password via mail.

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

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)

Depending on your environment or hosting provider, you may or may not be able to use certain special characters as part of your username or password. For example on Pantheon, Pantheon SSH (which both Terminus and Drush @pantheon aliases use) explicitly rejects any command string that contains certain characters in any position, regardless of quoting or escaping.
The excluded characters are:

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;

Request new password via e-mail

You can reset your password by requesting a new password at

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