DEV Community

Rahul Khan
Rahul Khan

Posted on

Reset Drupal Admin Password using Drush

This article describes how to reset the Drupal administrator password using Drush. We can use the Drush command line tool to reset the administrator password (or the password of any other user).

To do this, we have to first log in with our account using SSH & enter the following commands:

site_name@dev-1234:~$ cd ..
site_name@dev-1234:/home$ cd ..
site_name@dev-1234:/$ cd var/www/html/site_name/docroot
site_name@dev-1234:/var/www/html/site_name/docroot$ drush upwd admin --password=Password123
Changes password for admin
site_name@dev-1234:/var/www/html/site_name/docroot$ exit
Connection to closed.
Enter fullscreen mode Exit fullscreen mode

I did this for my project in DEV environment. I hope this is helpful & I would appreciate if any better solution is available.

Top comments (0)