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:

Latest Articles

VSCode Drupal Coding Standards Setup (From Scratch) admin_pixelthi… Mon, 12/22/2025 - 16:01 VSCode Drupal Coding Standards Setup (From Scratch)

VSCode Drupal Coding Standards Setup (From Scratch)

vscode
Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file admin_pixelthi… Sun, 12/01/2024 - 16:49 Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

composer
Controlling ckeditor styling options with hook_editor_js_settings_alter admin_pixelthi… Thu, 05/16/2024 - 10:49 Controlling ckeditor styling options with hook_editor_js_settings_alter

Controlling ckeditor styling options with hook_editor_js_settings_alter

php hook hook_editor_js_settings_alter hook_field_widget_single_[WIDGET_TYPE]_form_alter