Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Drupal 8

You're reading from   Mastering Drupal 8 An advanced guide to building and maintaining Drupal websites

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781785885976
Length 456 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Chaz Chumley Chaz Chumley
Author Profile Icon Chaz Chumley
Chaz Chumley
William Hurley William Hurley
Author Profile Icon William Hurley
William Hurley
Sean Montague Sean Montague
Author Profile Icon Sean Montague
Sean Montague
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Developer Workflow FREE CHAPTER 2. Site Configuration 3. Managing Users, Roles, and Permissions 4. Content Types, Taxonomy, and Comment Types 5. Working with Blocks 6. Content Authoring, HTML5, and Media 7. Understanding Views 8. Theming Essentials 9. Working with Twig 10. Extending Drupal 11. Working with Forms and the Form API 12. RESTful Services 13. Multilingual Capabilities 14. Configuration Management 15. Site Migration 16. Debugging and Profiling

Configuring settings.local.php


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:

  1. 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.
  2. 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'; }  
  1. Save the changes to our settings.php file.;

With our change in place, we will need to make sure to clear Drupal's cache before our changes will take effect. Now that we have a local settings file in place, we can make a few more configuration changes that will allow us to not worry about always clearing the cache...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime