Installing Drupal with Drush on Ubuntu
Drush is a command on line interface that aid user to accelerate administrative and development operation for Drupal sites. When we installing this Drush, we can easily perform useful task just simply type command into a terminal-
actions that would normally hold multiple steps in a web browser.As you know that Drush runs on Drupal 6, 7 well as 8.
Couple of task that we can perform by using Drush easily aregiven below:
Drush Download Drupal from repo
Drush Download contribute modules
Drush Install Drupal from repo
Drush Update Drupal and contribute module versions
Drush Run updatedb
Drush Clear all the cache
Drush Run cron
Drush Run Drupal with a lightweight web server
Drush Import, export and merge configuration
Drush Add users and set their roles
Drush Add permissions to roles
Drush Backup and restore Drupal
Drush Copy your database and files to a remote server
– Installed composer globally:
$ curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
Install drush globally (for your user), we can list the version:
$ composer global require drush/drush:8.*
Composer path add to user file .bashrc :
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
Now reload terminal you have or just re-source the configuration that just you added.
$ source ~/.bashrc
After that you have Composer working and you can simply install latest Drush.
$ composer global require drush/drush:dev-master
Just keep Drush up to date.
$ composer global update
Nevertheless, latest version 8.x.x will install.
Now user can check if the update has been done by executing:
$ drush --version
In the last now, let’s start with Drush. First we’ll try Drush to download, install and run Drupal 8:
Step 1: Check latest D8 branch available
$ drush dl drupal-8 --select
Or
$ drush dl drupal-7 --select
So easy way, you just need to run command on your terminal :
sudo apt-get install drush