Chapter 13. The Drupal CLI

There are two command-line tools for Drupal 8: Console and Drush. In this chapter, we will discuss how they make working with Drupal easier by covering the following recipes:

  • Rebuilding cache in Console or Drush
  • Using Drush to interact with the database
  • Using Drush to manage users
  • Scaffolding code through Console
  • Making a Drush command
  • Making a Console command

Introduction

In the previous chapters of this module, there have been recipes that provide ways of using command-line tools to simplify working with Drupal. There are two contributed projects that provide Drupal with a command-line interface experience.

First, there is Drush. Drush was first created for Drupal 4.7 and has become an integral tool used for day-to-day Drupal ...

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.