How do I setup Drupal Console on Windows 7?
Asked Answered
O

7

6

How do I install/setup Drupal Console on Windows 7? In the video by the author, the environment used is Linux.

I tried to install it on Windows 7, but I wasn't able to use it to generate a module code.

Outhe answered 23/12, 2014 at 14:56 Comment(4)
I have no idea what your question is. I have no idea what "Drupal 8 console" is. If you want run a server and drupal on windows 7, the easiest way might be to install "wampsever", add the drupal files to the www directory. That is how I have been doing it the past few years, until I started running a virtual machine.Burdine
Console project is available at drupal.org/project/console project help in creating modules very fast. But I am not getting it worked on windows.Outhe
Oh, well maybe do what I do and run a virtual linux server on your machine. I use virtualBoxBurdine
I have answered this drupal.stackexchange please visit [Install Drupal console on windows in 3 steps ](drupal.stackexchange.com/questions/221210/…)Steersman
J
3

You can download the drupal console either using Git Bash

$curl https://drupalconsole.com/installer -L -o drupal

Or using windows command prompt

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

After downloading this file, place it beside php.exe file within your php folder (not project folder), restart your terminal/cmd-prompt and type

$drupal

to get started.

Besides downloading Drupal Console .phar file, you can also install Drupal Console using composer on windows.

First Download and install composer in your system.

Then on your windows command prompt or git terminal

$composer global require drupal/console:@stable
Jilly answered 29/7, 2016 at 2:10 Comment(0)
R
2

Create a file called drupal.bat

@php "%~dp0drupal.phar" %*
Reathareave answered 21/12, 2015 at 21:22 Comment(0)
A
2

Here's the full list of steps I took:

  • php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
  • added installation location to the global PATH
  • created a drupal.bat file in the same directory as drupal.phar. drupal.bat contains: @php "%~dp0drupal.phar" %*

Now you can call >drupal from any location. I would upvote @Nate's answer, but this is a new account.

Accomplished answered 13/4, 2016 at 19:31 Comment(0)
L
1
  • Open Git bash (or any terminal with curl capability)
  • Run curl https://drupalconsole.com/installer -L -o drupal.phar
  • Create file drupal.bat with content @php "%~dp0drupal.phar" %*
  • Copy both files (drupal.phar and drupal.bat) into C:\WINDOWS
  • Open new Command prompt window then try typing drupal list.

This steps assume:

  • Your PHP is on Path environment variables and you can run php --version.
  • You have Git for Windows installed.
Limnetic answered 18/5, 2016 at 16:14 Comment(0)
Q
1

you can install drupal console using composer

open the command line on windows then go to :

cd /path/to/drupal8.dev

now you can install drupal console :

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

after that you installed drupal console you can use it from drupal root directory where composer.json exist as follow:

vendor/bin/drupal <the_command>

you should replace <the_command> with one of the drupal console commands. you can see complete list of the commands here: drupal console commands

Quincunx answered 13/3, 2020 at 17:17 Comment(0)
I
0
  • Find a php.exe
  • Add this path to the environnement variable path
  • from terminal run

    php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
    
  • i then use php-storm IDE :

  • file/settings/command line

  • add tool based on symfony console
  • fill php path and drupal.phar path
  • console is now set
  • tools/run command

    drupal list 
    
Ingham answered 1/2, 2016 at 15:21 Comment(0)
E
0

if you have php and composer all setup make sure you're in your drupal root folder..open powershell (anyother cli) and do '

composer require drupal/console

'after this add. 'C:\<path to your drupalwebsite root folder>\vendor\bin' to your paths Environment variables

and you have composer installed: Remember to install and add composer to path variables for every local drupal installation.

Eckenrode answered 23/4, 2018 at 13:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.