Skip to main content

Drupal 8 Local Development: How to disable Drupal cache during development?

Step 1 : Uncomment the following lines in your settings.php file:

Step 2 : Copy example.settings.local.php to sites/default and rename it to settings.local.php.

The path is drupal_root/web/sites/default/settings.local.php

Step 3 : In settings.local.php, replace the following line with

Step 4 : Disable the render cache by uncommenting the following line : .

Step 5 : Disable the Dynamic Page Cache by uncommenting the following line : .

Step 6 : Copy development.ser vices.yml to local.ser vices.yml.

Step 7 : Add the following in your local.ser vices.yml`:

services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory parameters: twig.config: debug: true cache: false auto_reload: true

Step 8 : Rebuild your cache : drush cr;

See examples that you can copy and paste: