Drush
Drupal 8
How to
Drush
What's that?
Drush?
Drush is an awesome shell interface for managing Drupal right from your command line.
Drush is a great tool for quickly managing routine tasks with a Drupal installation.
Drush allows you to search the drupal.org site, install Drupal, enable modules, clear caches and much more.
Drush
Common uses
$ drush status

$ drush cr
CR = Cache Rebuild (clears caches)

$ drush en <module>
OR
$ drush en pathauto -y


$ drush pm-uninstall
Example:
$ drush pm-uninstall pathauto

$ drush pml

$ drush pml --no-core

$ drush uli
Unique Login Identifier
Generates one-use login-url's

- copy everything after http://default/
- add to your site domain:
- http://pietermathys.dd:8083/user/reset/1/1510511190/fgXnRXVhh6825V0jXleKWyChP9vI04NRt77V4lHuGzo/login
- paste in browser
$ drush uli -uri
$ drush uli --uri http://pietermathys.dd:8083/

$ drush updb
Perform database updates


$ drush updb

Drush
Installation
Acquia Dev Desktop
Pre-installed
Use the Acquia terminal

Acquia Dev Desktop

Acquia Dev Desktop
Test if it works?
$ drush status
If error
try:
$ composer require drush/drush:9.*
HP Fatal error: Declaration of Drush\Command\
DrushInputAdapter::hasParameterOption($values)
must be compatible with Symfony\Component\
Console\Input\InputInterface::hasParameterOption
($values, $onlyParams = false) in /Applications/
DevDesktop/tools/vendor/drush/drush/lib/Drush/Command/DrushInputAdapter.php on line 27
Without Acquia DD
Mac OS X
Drush + Mac OS X
Follow this guide:
Without Acquia DD
Windows
Drush + Windows
Drush on Windows is experimental, since Drush's test suite is not running there (help wanted).
-
Acquia Dev Desktop is excellent, and includes Drush. See the terminal icon after setting up a web site.
-
Or consider running Linux/OSX via Virtualbox. Drupal VM and Vlad are popular.* These Windows packages include Drush and its dependencies (including MSys). * 7.0.0 (stable). * 6.6.0. * 6.0.
-
Or install LAMP on your own, and run Drush via Git's shell, in order to insure that all depedencies are available.
Drush
Resources
Resources
CMS1 - D8 Drush
By Pieter Mathys
CMS1 - D8 Drush
How to use Drush
- 648