Drupal Console is a Symfony application built as is a command line interface (CLI) tool. It is to aid developers to quicker manage their Drupal 8 installation site and generate code (ie, boilerplate code) for modules and themes as well as debugging Drupal 8 code.
It is similar to Drush in that it can be use to manage downloading and installing modules and themes. But it offers more than that:
- Takes advantage of the Symfony Console and other third-party components to generate PHP, YML, and other files.
- Takes advantage of other modern development practices.
- Saves development time, both during migration of existing Drupal modules and when writing new ones.
- Provides easy-to-learn tools that make Drupal 8 development, by extension, also easier to learn.
- Reduces development time for remaining Drupal 8 tasks and for development of new modules.
Installing Drupal Console on your server is a striaghtforward process and here's how:
Open a terminal and SSH to your server and follow the steps below:
# Run this in your terminal to get the latest project version: curl https://drupalconsole.com/installer -L -o drupal.phar # Or if you don't have curl: php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar # Accessing from anywhere on your system: mv drupal.phar /usr/local/bin/drupal # Apply executable permissions on the downloaded file: chmod +x /usr/local/bin/drupal # Copy configuration files to user home directory: drupal init --override # Check and validate system requirements drupal check
I didn't manage to build Drupal Console using the other method, ie, Composer as it took up too much memory so server just killed the process.
However, if you are running CenOS 7.2 running PHP 5.6 you might encounter some issues such as:
If you run drupal check and nothing happens, check your error log, if it says:
[27-Jun-2016 18:25:30 UTC] PHP Fatal error: require(): Failed opening required 'drupal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in phar:///usr/local/bin/drupal/bin/drupal on line 3
Or, it's warning about
Segmentation Fault error.
Then you will need to disable Ioncube loader. You can do this by uncommenting out ioncube loader:
sudo nano /usr/lib/php.ini
Find this line:
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.6.so" and uncomment it out:
Remember to restart Apache
/sbin/service httpd restart
If you have PHP websites or applications that requires Ioncube Loader, i'm afraid you are out of luck, see: https://github.com/hechoendrupal/DrupalConsole/issues/1168 (even though the link refers to an issue discovered on Nov 2015, this issue still remains to be unresolved by IonCube).