Error message

Warning: unlink(/var/www/fliegen.com.tw/sites/default/files/css/follow.css): Permission denied in drupal_unlink() (line 2308 of /var/www/fliegen.com.tw/includes/file.inc).

Using Drupal Console in Windows

 

DrupalConsole is a CLI command tool exclusive for Drupal 8 development to generate boilerplate code, interact with and debug Drupal.

It requires running under a php environment and bash shell, which needs additional efforts to use DrupalConsole in Windows, as well as the popular Drush command. Our senior Drupal developer, Tokimeki[1], made a portable application package including the AMP stack, Drupal 8 and the DrupalConsole.

Follwing this article, you can quickly have a DrupalConsole development environment all set in your computer.

 

Installation

 

Requirements

  1. Requires Visual C++ Redistributable for Visual Studio 2015

  2. Requires BASH emulator to run command, ex. Git BASH from Git for Windows[2]

  3. None of WAMP stack like application installed, or service registered at port 80, 443 and 3306. This portable application won’t register the services.

  4. Prefer OS from 64 bit Windows 7+; Compatible to WIndows XP+,

 

Step by steps

  1. Download Portable APM (v8.1.7)

  2. Extract file to C:\@site[3]

  3. Start APM Express by executing apmxe.exe inside the folder.

    • Apache and MySQL will be start immediately.

    • You’ll get an icon in taskbar that shows the status of the services.

Start the Application

Your Drupal environment is now started after you execute the APM Express. Now you are able to open the pre-installed Drupal 8 and execute CLI commands.

 

Drupal Site

 

Start the BASH console

DrupalConsole is a CLI tool, it requires a BASH console to run bash script. This package provide a console tool for you to start using DrupalConsole as well as Drush.

console.png

Executing console.cmd will open the command line console.

drupal.png

Screenshot of drupal command

> drupal

 

drush.png

Screenshot of drush command

> drush status

 

Execute DrupalConsole

You don’t need to install the DrupalConsole, it’s already installed in the package.

Simply start with the initialize command to copy configuration files to user home directory, and it’s all set to start using DrupalConsole to build your application. For more information about houw to use DrupalConsole, please visit drupalconsole.com, you'll find all the information there.

init.png

Screenshot of drupal init command

> drupal init

 

References

  1. Tokimeki (d.o. agrozyme) http://drupal.org/u/agrozyme

  2. You can also use Cygwin, win-bash

  3. The path may have issue of Escape sequences in Windows since Windows point the folder with \ back-slash. If you want to use another folder, make sure it doesn’t cause the Escape Sequences.