Mac OSX + Drush = Time saved | Pixel Clever

The longer I have my mac the more things I find that drastically simplify my life as a Drupal developer. Now for fairness sake I should admit that there are still some things about mac that annoy me (namely Finder which is in many ways inferior to the windows explorer), but that is another story all together. Drush, the command line tool for Drupal is one of those many little things that make me very happy to have broken free from the slimy grasp of Bill Gates and his minions.

Drush makes my life sooooooo much easier. Sure getting it installed is a bit of a trick if you are new to the mac, but once you get it installed it makes downloading, enabling, disabling and updating modules a breeze.

Don’t you hate having to go to Drupal.org, downloading the tar file, unzipping it then visiting the modules page, enabling it etc…? I don’t like wasting time on menial, repetitive task like this, there are more productive ways of spending my time (I’m sure you can relate). Once Drush is installed correctly downloading a module (imagecache for example) is as simple as navigating to the sites/all/modules or the sites/default/modules directory of your drupal installation with Terminal and typing in ‘drush -6 dl imagecache’ (The -6 indicates the core version you want for the module). Then magically the module downloads in an unzipped version ready for use. You can even enable the module directly by typing the command ‘drush enable imagecache’, or disable it with ‘drush disable imagecache’.

But wait there’s more! You can also update your modules directly from the command line with Drush by typing ‘drush update imagecache’. Not only will Drush download the newest version of the module in question but it will also give you the option to go ahead and run the update.php page for you!

Now these little commands that I listed above are the ones that I use most often. You can get a complete list of the commands available to Drush by typing ‘drush help’. In that list you will find things I would have never imagined could be done through the command line such as ‘variable get’ which allows you to find the value of a drupal site variable, ‘variable set’ which lets you set a site variable, bam backup which backs up the sites database using backup and migrate, and much, much more.

All I can say is that if you don’t have Drush up and running on your test server (or main server) then you owe it to yourself to get it. At this point my testing environment on my mac is more advanced than the server I use to host PixelClever.com… Drush alone is enough to make me consider upgrading to a vps.