Setting Up Drupal8 local dev. Environment
-
Add settings.local.php file to ../sites/default directory. Use example.settings.local.php file and rename
-
In settings.php file uncomment lines (and place at bottom of file):
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
-
In settings.local.php disable render cache by uncommenting:
$settings['cache']['bins']['render'] = 'cache.backend.null';
-
In settings.local.php disable dynamic page cache by uncommenting:
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
-
In development.services.yml file set parameters -> twig.config to the following:
twig.config:
debug: true
auto_reload: true
cache: false