What is DRUSH?
- more refined one
Discover the most common DRUSH commands
- Clear Cache (cc): it allows you to either choose a specific cache (drush cc) or to quickly clear them all (drush cc all)
- Install Drupal: that's right, installing Drupal from scratch is quicker and easier (with just two basic commands) than ever.
- Updatedb (updb): why should you "invest" valuable time in running updates using update.php, when you can... "claim" your spare time by simply running any available database updates using this magic formula: drush updatedb?
- Feature-update (fu): do a comparison yourself and see how much time it would take you to update a feature in your Drupal website (after you've applied a certain change stored in that particular feature) the old-schoolish way (e.g. exporting the feature manually in the admin interface) compared to... typing this time-saving shortcut here: drush feature-update feature_name
- Feature-revert (fr): you'll get even more eager to experiment, to... play with the features available in Drupal when you know that reverting your features to their code versions is as quick and simple as typing drush-feature-revert feature_name
- Enable a module: type drush en name_of_module -y or drush -y en name_of_module
- Pm-update (up): drush pm-update allows you to update Drupal themes, modules and core while you're saving priceless free time for your other... non-website development-related activities
- Database tasks (sql-dump, sql-cli): save a considerable amount of time and back up your database (while giving your... mouse a rest), by simply using this shortcut in your command-line: sql-dump, then simply restore it using this magic combo: sql-cli.
You're more likely to become a DRUSH “groupie” if:
1. You hate... mice
- Go to drupal.org.
- Get Started
- Download Drupal
- Download the tar.gz.file
- Install your new Drupal
- Going back to drupal.org for installing your modules (unzip a bunch of files) etc.
- type cd /var/ww...
- run drush dl drupal-7.0...
- cd /var/www/drupal-7.0 and install your new Drupal website: drush site-install –db-url=mysql://root:secret@localhost/drupal...
- type "y" at the following prompt
2. You work in a large environment where relying on FTP or carrying out tasks administratively is not an option
3. You want to sharpen your command-line skills
4. You're... open to new tools, constantly testing new technologies aimed at boosting your (and your team's) productivity
5. You just hate trading priceless personal life time for... more efficiency in your professional life
Is installing DRUSH a dread?
- Pick the directory to place your drush in: cd /usr/local/share
- Get drush: [sudo] wget https://goo.gl/GwdpKe it: tar xvf drush-6.x-3.3.tar-gz
- Remove the package: rm drush-6.x-3.3.tar.gz
- Change permissions: chmod u+x drush
- Create a link: In -s /usr/local/share/drush/drush /usr/local/bin/drush
- Run drush: [sudo] drush