Установка консоли Drupal под Windows

https://www.drupal.org/node/2711073

I installed drupalconsole on Window 7 as follow:
1. Install XAMPP, or update XAMPP, make sure that PHP version 5.6 or above
2. add path: C:\xampp\php to window path variable (Right click on Computer, > Advanced system settings > Environment Variables > edit path)
type php --version, make sure the result version is 5.6 or above
3. create folder: c:\drupalconsole, cd to this folder on the command , and run this command:
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar

Make sure that we have file drupal.phar under folder c:\drupalconsole

4. Create drupal.bat file under this folder: c:\drupalconsole, and paste the following code to this file:

@php "%~dp0drupal.phar" %*

5. add path c:\drupalconsole to window variable path (Right click on Computer, > Advanced system settings > Environment Variables > edit path)

6. restart the window, and on the command line type: drupal list, or drupal --version

Share this post

Leave a comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.