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, 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.
Requires BASH emulator to run command, ex. Git BASH from Git for Windows
None of WAMP stack like application installed, or service registered at port 80, 443 and 3306. This portable application won’t register the services.
Prefer OS from 64 bit Windows 7+; Compatible to WIndows XP+,
Step by steps
Download Portable APM (v8.1.7)
Extract file to C:\@site
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.
Your Drupal site is now running at http://localhost
You can login with default account & password:
To access your database, access the phpMyAdmin at http://localhost/~phpMyAdmin
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.
Executing console.cmd will open the command line console.
Screenshot of drupal command
Screenshot of drush command
|> drush status|
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.
Screenshot of drupal init command
|> drupal init|