![Drush... love it... deeply...](http://flink.com.au/sites/default/files/styles/large/public/field/image/Deep%20Drush_0.jpg?itok=oEazYh9v)
Site maintainers can give you many good reasons for using Drush, I give you one: drush up
.
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
drush
command generally available to all users, add/Libraries/drush
to the file/etc/paths
. Use your favourite editor:
sudo vim /etc/paths or sudo nano /etc/paths
Alternatively individual users can add to their~/.profile
file this line:
export PATH=$PATH:/Library/drush
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:
drush status
If you don't see anything suspicious in the output of the above command, then go for it:
drush up
You've got to love that! A list of more time-saving commands is printed when you type:
drush help
View more tips and tricks...
Comments
drush up core only
I think you'd have to be crazy to use drush up. What if you have a problem upgrading one module? Backing up and troubleshooting that is a pain - which one is causing the problem or is it an interaction. I always only upgrade one module at a time and only after reading the readme to see what's changed, test the site for a while and then move on to the next module. I've been seriously burned mass upgrading everything at once. Oh, and test modules on a test server first of course.
Isn't there a way to do drush up only for core?
Absolutely -- be cautious
drush up
for core only would be a great option -- feature request to the Drush team?Don't know why I didn't see
Don't know why I didn't see this before, but to update core only: "drush up drupal" and of course "drush up module_name" for any individual module.