Site maintainers can give you many good reasons for using Drush, I give you one:
This one command alone will save you the 60 seconds investment of your time now many times over.
drush up automatically downloads the latest and greatest versions of all modules on your site, including contributed modules as well as a full core upgrade, then runs the update script. And just in case something goes wrong, it first backs up the entire source of your site.
I know that the Drush project page suggests to use
pear. Or, if you already have Homebrew you can just type:
brew install drush. However if your OS isn't sufficiently loaded with standard and not-so standard software, these utilities may not be instantly available on your system. Homebrew, for instance, requires Xcode.
And since we only have 60 seconds, we're keeping this as lean as possible.
The instructions below are for Mac OS X. Other flavours of Unix/Linux will be very similar.
- Download the .tar.gz file from http://drupal.org/project/drush like any other module. However as Drush is not a Drupal module, don't uncompress it in your Drupal tree, but somewhere more system generic, like /Libraries or /usr/local/bin.
- To make the
drushcommand generally available to all users, add
/Libraries/drushto the file
/etc/paths. Use your favourite editor:
sudo vim /etc/paths or sudo nano /etc/paths
Alternatively individual users can add to their
~/.profilefile this line:
And that's all you need. To make sure it's working, open a new terminal window, cd into your Drupal document root and type:
If you don't see anything suspicious in the output of the above command, then go for it:
You've got to love that! A list of more time-saving commands is printed when you type:
View more tips and tricks...