The Drush (DRUpal SHell) one shell based, PHP application written in Drupal CMS system is used to control, manipulate, and administer Web sites. On the surface, Drush is a tool for installing and updating Drupal modules, although the program can be used for more extensive tasks. It allows you to efficiently and quickly manage the entire Drupal system from the command line without having to access the web site administration interface.
Drush was originally developed by Arto Bendiken for Drupal 4.7. 2007 In May, Franz Heinzmann redesigned it for Drupal 5. The application is maintained by Moshe Weitzman with the support of Owen Barton, greg.1.anderson, Jonhattan, Mark Sonnabaum, Jonathan Hedstrom and Christopher Gervais.
Installing
There are several ways to install Drush:
Using Composer
If the server has the Composer PHP package management system, then the terminal is Drupal based by going to the main directory of the website can be installed with the following Composer command:
composer require drush/drush
Installing the Debian package
The Drush program in packaged form only available on Debian 8 (Jessie), which is below apt-get command to install:
sudo apt-get install drush
Then in the /etc/drush/drushrc.php configuration file you need to set the path to the root directory of the Drupal website.
Areas of application
With the command line application, almost all settings for Drupal-based web pages can be made from the command line. Some important areas:
- Global settings
- Cache management
- Configuration settings
- Find, import, update language translations
- Launch PHP interactive shell for more sophisticated tasks
- Listing, installing, updating, uninstalling Drupal modules
- Schedule tasks
- Role Management
- Database updates, maintenance, and other bug fixes
- Query different status flags
- Turn themes / makeup on / off
- Manage users
- Manage Views
To list the complete library, enter the following command:
drush list
The output of executed commands can be extracted in several formats, such as: JSON, CSV, XML. It is also easy to use for automated tasks.
- Wikipedia - Drush
- Official site of Drush
- GitHub page
- Debian page
- Drupal - Reference for Drush commands
Related Content:
- 79 views