DEV Community

Cover image for How to Disable Drupal 9 Cache and Enable Twig Debug
Amulya
Amulya

Posted on

2 1

How to Disable Drupal 9 Cache and Enable Twig Debug

If you have heard of Drupal cache system then it's okay, but you have not heard of. Cache is a part of Drupal core that means whenever you make many change you must clear the cache to see the changes on the site and that is time consuming.

This post will help you quickly disable Drupal cache and also enable twig debug mode that will be helpful if you are going custome or build Drupal theme.

The only requirement is - you must have composer installed on your system.

I am using Linuxmint for my development environment but you can follow these steps on any OS of your choice.

Let's do it...

  1. Navigate to the Drupal root folder/directory
  2. Add drupal/console to the drupal instance
  3. Change the site mode to dev with drupal console

cd /var/www/html/drupal

sudo composer require drupal/console

sudo vendor/bin/drupal site:mode dev

You are done.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more