1

When I try to use drush to work on my local site I get this error:

Command pm-update needs a higher bootstrap level to run - you will need to invoke drush[error] 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.

I have wamp server installed on windows 10. I also have composer and drush installed on windows 10. I have the user environment path set up correctly. I am in the drupal directory. I have my local drupal site set up but I cannot get drush to work. I have been crawling the internet and can only find older solutions.

My user environment path for drush is C:\Users\Name\AppData\Roaming\Composer\vendor\drush\drush

My user environment path for composer is C:\Users\Name\AppData\Roaming\Composer\vendor\bin

When I type drush status I get


$ drush status
 Drupal version         :  8.1.8
 Site URI               :  http://default
 Database driver        :  mysql
 Database hostname      :  localhost
 Database port          :  3306
 Database username      :  root
 Database name          :  tekopolis
 PHP configuration      :  C:\wamp64\bin\php\php7.0.4\php.ini
 PHP OS                 :  WINNT
 Drush script           :  C:\Users\Anthony\AppData\Roaming\Composer\vendor\drush\drush\drush
 Drush version          :  8.1.3
 Drush temp directory   :  C:\Users\Anthony\AppData\Local\Temp
 Drush configuration    :
 Drush alias files      :
 Drupal root            :  C:\wamp64\www\tekopolis
 Drupal Settings File   :  sites/default/settings.php
 Site path              :  sites/default
 Sync config path       :  sites/default/file/config[...]/sync

Does anyone know how to get drush working on windows 10 without acquia dev?

  • This type of question has been asked many times. The problem can be many things and you just have to start at one end and try all of the things that have worked for other people. (See the list of related questions in the right margin.) Two tips: Turn on debugging for Drush (use -d) and read this answer about hostname - drupal.stackexchange.com/a/138897/24060 – hansfn Sep 8 '16 at 13:09
1

My experience is that these kind of tools are more easier to install on a Linux based system (ports of this programs to Windows are always limited in their capabilities). Luckily, the Windows 10 Anniversary update includes "Ubuntu on Bash on Windows 10", which allows you to natively run terminal-based Linux applications and Bash commands in Windows. Using this feature you can simply follow the native tutorials/install instructions.

To install this Bash shell in Windows 10 (after installing the Anniversary Update), you have to enable the developer mode (go to Settings > Update and Security > For developers). Then in the start menu search for the application: "Turn Windows features on or off" and with this application enable the "Windows Subsystem for Linux (Beta)". A reboot of your computer will follow and after this search in the start menu for "Bash" and follow the instructions. Once completed, you can use the program "Bash on Ubuntu on Windows" to start up your Linux shell.

With apt-get you can install php5 (don't forget to use sudo here), from there you can follow the install instructions of Composer and/or Drush.

  • 1
    I also recommend using WSL (Windows subsytem for Linux): It's a piquant solution that takes very few resourced and hence useful for many Windows based drupalers. – JohnDoea Sep 17 '16 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.