Nuestra base de conocimientos sólo está disponible actualmente en inglés. Estamos en el proceso de traducir estas páginas y las publicaremos cuando estén disponibles.
How to install Drupal Console
This article describes how to install Drupal Console.
Drupal Console is a command-line tool used for Drupal administration and development. It is currently intended to complement, rather than replace, the Drush command-line tool.
Drupal Console only works with Drupal 8. It does not work with earlier versions of Drupal.
Installing Drupal Console
To install Drupal Console, follow these steps:
- If you have not already done so, install a Drupal 8 site. You must have a Drupal 8 site installed on your account to install Drupal Console.
- Log in to your site using SSH.
- At the command prompt, change the current directory to where the Drupal site is installed. For example, type cd ~/public_html/drupal.
- To install Drupal Console, type the following command:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
To ensure that you can run Drupal Console from any directory, type the following commands. Replace username with your account username, and replace drupal_dir with the name of the directory where you installed Drupal:
echo 'alias drupal="/home/username/public_html/drupal_dir/vendor/bin/drupal"' >> ~/.bashrc
You can now run Drupal Console by simply typing drupal at the command prompt from any directory in your account.
To verify that Drupal Console installed correctly, type one or both of the following commands in the Drupal site directory:
You should see information about your Drupal site.
- Using Drush for Drupal
The Drush command-line tool enables you to perform many administrative tasks for Drupal—backups, restores, and much more. Learn how to use some of this powerful tool’s features in this article.
- Installing Drush manually
You may need to install a newer version of Drush that is compatible with the latest Drupal versions. This article shows you how.