This is because the non-MAMP PHP will look for a Unix socket in /var/mysql (or similar) and the actual socket is within the MAMP package directory, e.g. Using a version of PHP other than the MAMP one will probably result in PHP not being able to connect to the MAMP database via 'localhost'. MAMP, XAMP and similar package their own version of PHP and MySQL within the package. To check the Drush version use:īrew info drush Note for MAMP, XAMP etc users For Drupal 8 sites, Drush version 8 is the lowest version that is supported. You can instead use the '-r' and '-l' options to explicitly pass that information.Ĭonsult the extensive documentation on the Drush website here.įor Drupal 7 sites you can use any version of Drush up to and including Drush 8. It uses that directory to determine which Drupal site it is interacting with. Change the path to the one appropriate for your site. The 'cd' is there to change the current (working) directory for Drush. For example: cd /path/to/your/drupal/sites/default
#MAC BREW UPDATE NODE INSTALL#
If so, please use: "sudo apt install linuxbrew-wrapper".Īfter that you can start running Drush on your installation.
It is possible that you might experience problems with the above command due to the emergence of linuxbrew. Tap the PHP formulae repo and its dependencies, and install Drush: brew tap homebrew/dupes Note Homebrew changed their repo structure! Read the "Background" section here for more information. This will install homebrew in your /usr/local folder, install git and link Homebrew to its git repository. Recent versions of OS X don't ship with Xcode so you might need to install "xcode-select -install") Preparing for DrushĪfter successful installation of Homebrew we need to be able to grab drush from git. If you haven't installed Homebrew, follow the the installation instruction for Homebrew. It's a easy and flexible way to install UNIX tools Apple didn't include with OS X. The correct way to install drush is described in the Drush docs: 8.x, 9.x (drush-launcher) This page is deprecated, as homebrew has changed and homebrew/php is abandoned.