-3

How do you login to a Drupal site if you do not have the password of the admin user or user 1 but still have access to the command line? Can I use drush to login to the Drupal site

  • The problem is not about a remote site right? This is to do with logging in to a Drupal site as any user of the site. – anoopjohn Oct 25 at 0:30
1

You can login to the Drupal site if you have access to the command line and Drush using the following Drush command

$ drush uli username

Will give you a URL that you can copy paste into your browser address bar and login as that user. Make sure that you update the domain name to be the same as that of the site.

Ref: https://knackforge.com/blog/sivaji/how-login-any-user-drupal-site

  • To update the domain, use --uri like this: drush uli username --uri=http://example.com. – hotwebmatter Oct 31 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.