We are all familiar with Drupal's settings.php file. However, in Drupal 8, we can now have different configurations per environment by creating a settings.local.php file that the default settings.php file can reference. This is the first step in allowing us to enable Twig debugging:
- First, we will need to copy example.settings.local.php, located in the /sites folder, to the /sites/default folder and rename the file to settings.local.php.
- Next, we need to open settings.php, located in the /sites/default folder, and uncomment the following lines:
if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; }
- Save the changes to our settings.php file.;
With our change in place, ...