🇪🇸
Drupal Documentation and Guides
Guides
Spanish
Spanish
  • Getting Started with Drupal
  • Installing Drupal
  • Drush
  • Theme & Module Development Concepts
  • Modules
  • Themes
  • FrontEnd
    • Javascript
  • Backend
    • Helpful Drupal Classes and Methods
    • Entities
    • Nodes
    • Taxonomies
    • Hooks
    • Twig
    • Libraries
    • Queries
    • Forms
    • Files & Images
    • Helpful functions and solutions
  • Guides
    • Custom Fields
      • Entity Reference and integer
      • Two Text Fields
      • Textfields, formatted text and numbers
      • Links and media elements
Powered by GitBook
On this page
  • Instalation
  • Drush Commands i use most

Drush

Drush is a command line tool that allows you to interact with Drupal. It's a very powerful tool that can be used to install Drupal, manage modules, themes, and much more.

Instalation

It's pretty easy to install drush. On the terminal Go to your root drupal folder, and execute the following command:

composer require drush/drush

Drush Commands i use most

# Cache clear
drush cc

# Cache and rebuild, same as domain.com/admin/rebuild.php
drush cr

# Export configuration, creates a configuration file in /config/sync
drush cex

# Import configuration, imports the configuration file from /config/sync
drush cim

# List modules/themes installed, can add flags to be more specific
# --status
# --type
drush pml

# Enable module
drush en MODULENAME

# Disable module
drush pmu MODULENAME

# Specific Migration commands

## drush migrate:import MIGRATIONNAME
drush mim MIGRATIONNAME

## drush migrate:rollback MIGRATIONNAME
drush mr MIGRATIONNAME

## drush migrate:reset MIGRATIONNAME
drush mrs MIGRATIONNAME
drush mrs MIGRATIONNAME --update
drush mrs MIGRATIONNAME --force

## drush migrate:status MIGRATIONNAME
drush ms MIGRATIONNAME

## drush migrate:messages MIGRATIONNAME
drush mmsg MIGRATIONNAME
PreviousInstalling DrupalNextTheme & Module Development Concepts

Last updated 2 years ago