Drush on Windows and Mac

Yes, this is another post about Drupal. I just feel like I need to write some of this stuff down as I figure it out, for my own reference if nothing else. I recently got Drush working on both my work PC and my Mac.

Surprisingly, it was a lot easier to get working under Windows than under Mac OS X. The Windows setup is mostly accomplished by just running this installer. The main MSI file up on the site right now is dated 6/4/12, so it’s up to date. The only thing I changed was to edit the path settings post-install to put my existing copy of PHP in my path, so Drush could find it.

On the Mac, I wanted to follow the recommendation on the main Drush page to do the install via Pear. I did not have Pear set up on my Mac, though, so I needed to figure that out first. That’s not hard to do under 10.7, as described in this blog post. I then had a couple of permission problems to work through, but after taking care of those, I seem to have a working Drush install.

I also needed to do a little follow-up work to add /usr/local/mysql/bin to my path, to get archive-dump to work. I’m not sure why I hadn’t added that to my path when I installed MySQL back in December. (I was amused, by the way, to see that the last edit to my .bash_profile was from back in 2005. Apparently, I was trying to get gpg working. Also, apparently, .bash_profile gets pulled along when you migrate to a new Mac, since my current MacBook isn’t *quite* that old.)

I intend to write a post soon on how I’m running a PHP script under Drush to import data into Drupal, but i don’t think I’m going to write that up today.

Leave a Reply