-
Create Local Settings
Copy and rename the sites/example.settings.local.php to be sites/default/settings.local.php
sudo cp web/sites/example.settings.local.php web/sites/default/settings.local.php
-
Disable Cache
Uncomment these lines to Disable the Render and Page Cache:
# Disable the render cache 69 settings['cache']['bins']['render'] = 'cache.backend.null'; # Disable Internal Page Cache 91 settings['cache']['bins']['page'] = 'cache.backend.null'; # Disable Dynamic Page Cache 100 settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
-
Site Settings
Optional - Cleanup settings.php by removing all comments.
-
Enable Local Settings
Uncomment these lines in settings.php to include settings.local.php:
if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; }
-
Local Site Database
Move databse array to settings.local.php
Config files are saved in the sites/default/files/ directory
-
Move the config files outside the site root directory
sites/default/settings.php
$config_directories['sync'] = '../config/sync';
-
Delete config directory located in the /sites/default/files/ directory
$rm -rf sites/default/files/config...
-
Export the config files with drush
$drush config-export
-
Add Twig Config Parameters
Open sites/development.services.yml and add the following block
parameters: http.response.debug_cacheability_headers: true twig.config: debug: true auto_reload: true cache: false services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory
-
Rebuild Drupal Cache
Rebuild the Drupal cache
$drush cr
or by visiting the following URL
http://yoursite/core/rebuild.php