Customize settings.php

Last updated 11th May 2021

Objective

For applications using the drupal build flavor (those based on our Drupal 7 example), Web PaaS automatically generates a settings.php file if not present and will always generate a settings.local.php file. This allows the Drupal site to be connected to MySQL without any additional configuration.

If you wish to customize either file, we recommend instead using the example files provided in our Drupal 7 project template. There are two: settings.php and settings.platformsh.php. The former will automatically include the latter, and all Web PaaS-specific configuration is found in the settings.platformsh.php file. It will also automatically include a settings.local.php file if found so it will not conflict with your local development workflow.

You should never commit a settings.local.php file to your repository.

If you need to add additional configuration that is specific to Web PaaS, such as connecting to additional services like Redis or Solr, those changes should go in the settings.platformsh.php file.


Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices exclude VAT. VAT may vary according to the customer's country of residence.