This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Introducing Cloudways Community Forum. Start Discussions and Get Instant Help From Cloudways Community. JOIN NOW

Common Drupal 8 Drush CommandsJuly 31, 2017

 

In this KB

  • Importance of understanding Drupal configuration via Drush
  • Drupal 8 drush commands and their usage

 

It is essential for every Drupal developer to know how to use configure and use Drupal through Drush as it is a very valuable skill.

To get you started, below are some of the most common Drush commands for Drupal 8.

  • Clear cache: drush cache-rebuild(To clear all caches) or drush cc (To delete one specific cache)

image5

  • Clear cache even when there’s some problem with Drupal: drush sql-query “DELETE FROM cache”

image9

  • Open SQL command-line interface: drush sql cli

image7

  • Print database connection details: drush sql-conf

image10

  • String for connection to database: drush sql-connect

image6

  • Enable a module: drush en {name_of_module}

image4

  • Disable a module: drush dis {name_of_module}

image11

  • Update a module: drush up {name_of_module}

image1

  • Update Drupal core and themes: drush pm-update drupal

image8

  • Check watchdog (logged events): drush ws

image2

  • Runserver (PHP’s built-in http server for development): drush runserver

image3

The commands above are the ones we think might come in as most useful. To learn more about Drush and its commands, read the official documentation.

Please insert Content
Have Questions? Ask From Our Helpful Community

Comments are closed.

Do you still need help?

Our Technical Support team is always at work.