Drupal8 Local Environment

Image

Setting Up Drupal8 local dev. Environment

  1. Add settings.local.php file to ../sites/default directory.  Use example.settings.local.php file and rename

  2. 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';

              }

  1. In settings.local.php disable render cache by uncommenting:  

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

  1. In settings.local.php disable dynamic page cache by uncommenting:

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

  1. In development.services.yml file set parameters -> twig.config to the following: 

             twig.config:

                 debug: true

                 auto_reload: true

                 cache: false