Drupal 8 Consol Setup

By | January 12th 2019 11:25:11 AM | viewed 77 times

Step-1:Set the environment path variable - C:\xampp\php (Right click on "This PC", > Advanced system settings > Environment Variables > edit path > New)

Step-2:Set the environment path variable - C:\xampp\php (Right click on "This PC", > Advanced system settings > Environment Variables > edit path > New)

Step-3:Create a directory in the drive say C:\drupalconsole

Step-4:Open the command prompt and goto the drupalconsole folder - "cd C:\drupalconsole".

Step-5: Run the below command

 php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar

After running the above command, please make sure that the drupal.phar downloaded under folder c:\drupalconsole

Step-6: Create "drupal.bat" file under the folder - "c:\drupalconsole"

Step-7: open and paste the below line in the drupal.bat file

@php "%~dp0drupal.phar" %*

Step-8: Set path c:\drupalconsole to window variable path (Right click on Computer, > Advanced system settings > Environment Variables > edit path > New)

Step-9: Restart the window, and goto the project folder (xampp/htdocs/drupal) and run the following command

composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader

Step-10: Run the following command to check drupal console available commands

drupal list
bONEandALL