Skip to content

Installing Drupal Console

Drupal Console is a command‑line tool designed to help with Drupal administration and development tasks. It complements Drush by providing additional scaffolding and debugging features. On ruachost.com, you can install Drupal Console to streamline site management.

  • Automates repetitive Drupal tasks.
  • Generates boilerplate code for modules, controllers, and services.
  • Provides debugging tools for routes, services, and events.
  • Simplifies site administration from the command line.
  • Drupal Console only works with Drupal 8 and newer versions.
  • Verify your site is running Drupal 8 or 9 before proceeding.
  1. Log in to your ruachost.com Client Area.

  2. Open an SSH session to your hosting account.

  3. Navigate to your Drupal installation directory:

    Terminal window
    cd ~/public_html/drupal

Run the following Composer command:

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

To run Drupal Console from any directory, add an alias:

Terminal window
echo 'alias drupal="/home/username/public_html/drupal_dir/vendor/bin/drupal"' >> ~/.bashrc
source ~/.bashrc

(Replace username with your hosting account username and drupal_dir with your Drupal directory.)

Run one of the following commands to confirm Drupal Console is working:

Terminal window
drupal site:status
drupal site:statistics

You should see information about your Drupal site.

  • Drupal Console does not replace Drush; they complement each other.
  • Always back up your site before running administrative commands.
  • Ensure Composer is installed and updated before starting.