Drupal 11: Turn On Twig Development Mode Via Drush

These three Drush commands will turn on the Twig debugging output, disable the Twig cache, and disable the Twig cache.

drush state:set twig_debug 1
drush state:set twig_cache_disable 1
drush state:set disable_rendered_output_cache_bins 1

Doing this makes theme development much easier as it will prevent Twig templates from being cached and also add HTML comments to your theme to show what templates are being used.

Just remember to turn these settings off in production!

Add new comment

The content of this field is kept private and will not be shown publicly.