Need to quickly log into a Drupal site (useful for local dev sites) from the command line?
The drush user:login (uli) command generates one-time login URLs, allowing you to access your site quickly.
To log in as the admin user, simply run:
$ drush uli
This will open your site in a browser window, logged in as user 1.
If you prefer to get the login URL without automatically opening a browser, add the --no-browser option:
$ drush uli --no-browser
Need to log in as a specific user?
You can specify the username, user ID, or email address with the --name, --uid or --mail options. For example:
$ drush uli --name=john_doe
By default, Drush will attempt to determine the correct URL for your local site. If it can't, you'll get a partial URL that you can complete manually.
However, you can specify the exact local URL using the --uri option:
$ drush uli --uri=http://mysite.local
With these simple Drush commands, you can streamline logging into your local Drupal site during development. Whether you need to log in as the admin or a specific user account, drush uli saves time and effort.
#drupal #drush
~~~
If you found this post helpful.
♻️ Please repost and follow.
📧 Join my newsletter; link in the first comment.
Смотрите видео Using Drush user:login Command онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь WebWash 06 Сентябрь 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 14 раз и оно понравилось 1 людям.