I have installed Drush on a Mac and can use it to download modules for the drupal projects I have in XAMPP. However serveral drush commands like drush up give a needs a higher bootstrap level to run error message. How do I get around this issue?

Pauls-iMac:mysite Trotter$ drush up
Command pm-update needs a higher bootstrap level to run - you will   [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'up' could not be executed.                        [error]
Drush was not able to start (bootstrap) the Drupal database.         [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a
configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri
parameter on the command line. See `drush topic docs-aliases` for
 * connect the database through a socket. The socket file may be
wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.

Drush was attempting to connect to: 
 Drupal version        :  7.38                                      
 Site URI              :  http://default                            
 Database driver       :  mysql                                     
 Database hostname     :  localhost                                 
 Database port         :                                            
 Database username     :  root                                      
 Database name         :  mysite                             
 PHP executable        :  /usr/bin/php                              
 PHP configuration     :                                            
 PHP OS                :  Darwin                                    
 Drush script          :  /Users/Trotter/.composer/vendor/drush/dru 
 Drush version         :  7.0.0                                     
 Drush temp            :  /tmp                                      
 Drush configuration   :                                            
 Drush alias files     :                                            
 Drupal root           :  /applications/xampp/xamppfiles/htdocs/mysite 
 Site path             :  sites/default 

The drupal sites work fine, just not with Drush. I have tried forcing instead of localhost.

I notice that my issue is very similar to MAC -> Drush higher bootstrap level?. The answer supplied by ChristophWeber sounds promising, but does not include enough information more me to be able to try it. For example I cannot find my .bashrc file which I gather should be in my home directory, and if I needed to create it myself I'm not sure what should be in it.

  • 1
    .bashrc is for linux systems afaik. I think the equivalent for macs is .bash_profile
    – Beebee
    Sep 9, 2015 at 15:58
  • Thanks Beebee. I have a .bash_profile. The only line in it is the one for composer (how I installed Drush) export PATH="~/.composer/vendor/bin:$PATH" Sep 9, 2015 at 16:01
  • 2
    Try this: Open terminal and type which php. If it's not pointing to your XAMPP's bin directory, then in your .bash_profile file add: PATH=/Applications/XAMPP/xamppfiles/bin:$PATH then type source ~/.bash_profile && which php in your terminal. If it's pointing to XAMPP's bin folder then your php is now set to XAMPP's one.
    – Beebee
    Sep 9, 2015 at 16:06
  • Word of caution: Although Mac is case insensitive, if you want to do things correctly and avoid future problems, always respect the cases in file paths and names. For example: /applications/xampp should really be /Applications/XAMPP. Is this coming from your aliases file or did you manually change this to hide the real path of your site?
    – Beebee
    Sep 9, 2015 at 16:14
  • Are you calling the drush commands from the root of your local drupal install? I had similar issues with my acquia install on windows, don't know if that's the case but that worked for me.
    – nizz0k
    Sep 10, 2015 at 4:28


Browse other questions tagged or ask your own question.