Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Drush

By admin, 19 May, 2024

Enabling a Drupal Module Using Drush (drush en)

The drush en command is used to enable one or more modules in Drupal. By running this command, you can quickly activate specified modules without having to navigate through the Drupal administrative interface.

Syntax:

bash

drush en module_name

Replace module_name with the machine name of the module you want to enable. You can enable multiple modules by separating their names with spaces.

For example:

bash

Tags

  • #Drupal Planet
  • Drush
By admin, 19 May, 2024

Creating a Drupal Module with Drush

To create a Drupal module using Drush, follow these steps:

1. Install Drush: Make sure Drush is installed on your system. You can install it globally via Composer:

  bash

  composer global require drush/drush

2. Navigate to your Drupal project: Open your terminal and navigate to the root directory of your Drupal project.

3. Create the module: Use Drush to generate the module scaffold:

  bash

Tags

  • #Drupal Planet
  • Drush
By admin, 3 April, 2024

Exploring Drush Output Formatting

The `--format` parameter in Drush is used to specify the output format of the command results. It allows you to customize how the information returned by Drush commands is presented. Here's how it works:

1. **Text Format (`--format=text`)**: This is the default format for Drush commands. It displays the command output in a human-readable text format, with each item typically listed on a separate line. This format is suitable for viewing command output directly in the terminal.

Tags

  • #Drupal Planet
  • Drush
Drush
Powered by Drupal