All you command-line addicts (and skeptics, too), mouse haters and... spare time-craving developers, crafting your Drupal websites, gather around! It's time you all learned about this "Swiss army knife"-like tool which will make your work life so much simpler, far more refined and... more rewarding from now on: DRUSH!
 
 

What is DRUSH?

 
There are plenty of related definitions out there, but we like these 2 ones best:
 
"Drush is a command-line shell for Drupal, and it enables you to perform many administrative and website maintenance tasks from the command line instead of having to use the Drupal administrative interface" 
 
"Drush is an important tool for Drupal developers looking to speed up and simplify their workflows"
    
We envision DRUSH as a "way too valuable" tool to be overlooked if you're aiming at upgrading the old-schoolish, time-consuming (and therefore, less productive) way of managing your work to a:
  • quicker
  • simpler
  • more refined one
 
… as a DRUPAL web developer/administrator

 

Discover the most common DRUSH commands

 
Till you get to the point of actually setting up your own custom DRUSH commands, let us point out to you the main features that DRUSH can (easily) tempt you with:
 
  • 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. 
 
 .... and the list will get longer and longer as you get more and more eager to discover and to learn other productivity-boosting and time-saving shortcuts in DRUSH.

 

You're more likely to become a DRUSH “groupie” if:

 

      1. You hate... mice

 
Could you deny that mastering command-line skills is already a far more... elegant way of working, as a developer, compared to “exploiting” your mouse for opening and closing lots and lots pages in Drupal's administrative interface? 
 
Just imagine this highly suggestive scenario here: 
 
You need to install and reinstall (and eventually administer) several Drupal websites. Therefore, you'll get (mentally) ready for the tedious and boringly repetitive steps to come:
 
  1. Go to drupal.org.
  2. Get Started
  3. Download Drupal
  4. Download the tar.gz.file
  5. Install your new Drupal
  6. Going back to drupal.org for installing your modules (unzip a bunch of files) etc.
 
A whole lot of clicking and wandering about Drupal's interface, isn't it?
 
          Now consider work scenario no. 2:
 
  1. type cd  /var/ww...
  2. run drush dl drupal-7.0...
  3. cd /var/www/drupal-7.0 and install your new Drupal website: drush site-install –db-url=mysql://root:secret@localhost/drupal...
  4. type "y" at the following prompt
 
 
… and voila: with a few clicks (relying exclusivity on your good old keyword), you've had your new Drupal site installed and you're ready to... install your second and your third one, too...

 

     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?

 
Actually, you can benefit from its time-saving features right after you've walked through 7 easy setting up steps:
 
  • 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
 
 
Still, probably one of the best Drush features is that... it's constantly evolving, constantly improving, so... sky is the limit when it comes to quickly installing/developing and efficiently managing all your Drupal websites (for this is, in fact, the true beauty of Drush: it allows you to manage several sites at once, helping you turn yourself into an... admin guru). 
 
 
Give it a try, cure your command-line related “phobia” (if any) and unleash your full potential as a Drupal developer!
Development

We do Drupal development

Go to our Drupal page!

Visit page!

Browse cities

Recommended Stories

Drupal Commerce: Building Powerful E-commerce Solutions
E-commerce sales are projected to reach $6.3 trillion globally by the end of 2024. With online shopping… (Read more)
10 Minutes /
Choosing the Right Drupal Distribution: A Guide for Businesses
Choosing the perfect Drupal distribution can feel like navigating a maze—especially for businesses and government… (Read more)
10 minutes /
How OPTASY Creates Client-Centric Drupal Experiences
Agile methodology has revolutionized the way web development projects are executed, particularly for complex… (Read more)
7 minutes /