The new CLI for Drupal. A tool to generate boilerplate code, interact with and debug Drupal.
First, we need to install Drupal Console.
Drupal Console is needed not only for this time, but for future installations.
# 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
You may call drupal list
to see all available commands.
On the next step we'll download Drupal source code
drupal site:new
Console will prompt you to choose a folder to download Drupal. And on the next step you'll be asked to choose version of Drupal to download. I recommend to select the last one.
So, when Drupal is downloaded you need to install it.
drupal site:install
After few simple steps your Drupal site will be ready.
With this methodology, a Drupal fresh install take us between 5 to 7 minutes all from the command-line.