I lost my Drupal password, how do I get access again?

Biz Cook
August 17, 2017

Let’s pretend you don’t have access to the email for the main Admin user for a Drupal site. But, you DO have ssh access.

To create a temporary password follow these steps to regain access to your site.

Step 1: ssh into the server

ssh servername

Step 2: become the super user

sudo su

Step 3: change directories to be in the httpdocs (or wherever your main site root directory is.)

cd httpdocs

Step 4: type the drush uli command

drush uli

Step 5: in response, you’ll get a URL which you should copy and paste in the browser.

http://fakedrupalurl.com

Step 6: make your temporary password, and you’ll have access to the drupal backend of the site.

Very exciting!

Solutions Architecture

browse through our blog articles

Blog Archive