Samuli Natri
Jun. 17, 2016
Updated: Nov. 30, 2016
By Samuli NatriJun. 17, 2016
(Updated: Nov. 30, 2016)

How To Enable Development Mode In Drupal 8

How to disable page caching and enable debug mode.

Table of Contents

With Drupal Console

drupal site:mode dev

This creates/modifies sites/default/services.yml file so you might have to change the folder sites/default or the file services.yml permissions.


You can also do it manually:

cp sites/example.settings.local.php sites/default/settings.local.php

in sites/default/settings.local.php uncomment these lines:

$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

In sites/default/settings.php uncomment these lines:

if (file_exists(__DIR__ . '/settings.local.php')) {
  include __DIR__ . '/settings.local.php';

In sites/ add these lines:

    debug: true
    auto_reload: true
    cache: false

Samuli Natri is the founder of He started building Drupal sites in 2010 with Drupal 6. He attended Helsinki University and Helsinki University of Technology (Social Sciences and Computer Science). Read more...

Add new comment