---
title: "Managing Custom Logic in Drupal Multisite with sites.php and settings.php on Cloud IDEs for Multi-Experience Operations"
date: "2025-09-04T15:32:14+00:00"
summary: "Optimize Drupal multisite management with custom logic in sites.php and settings.php for cloud IDEs and multi-experience operations."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/cloud-ide/help/70556-managing-custom-logic-drupal-multisite-sitesphp-and-settingsphp-cloud-ides-multi-experience"
id: "e0c8099a-6262-46d2-9215-d06481ef6208"
---

To ensure consistent platform behaviour (reverse proxy, memcache, and so on), add the following line to your `settings.php` file after the require for settings.inc:

    < php require '/var/acquia/drupal/settings/overrides.php';

You might need to manually add these override files in non-production or development environment. For example, local IDEs.  
Sample: `/var/acquia/drupal/settings/overrides.php`

    <?php
    
    if (defined('Drupal::VERSION')) {
        require_once '/var/acquia/drupal/settings/overrides-d8+.php';
    } elseif (defined('VERSION')) {
        if (version_compare(VERSION, '7', '>=')) {
            require_once '/var/acquia/drupal/settings/overrides-d7.php';
        }
    }

### Current Drupal version

Includes `overrides-d8+.php`.  
Sample: `/var/acquia/drupal/settings/overrides-d8+.php`

    <?php
    
    if (empty($settings['reverse_proxy_addresses']) && !empty($settings['ah_reverse_proxy_addresses'])) {
        $settings['reverse_proxy_addresses'] = $settings['ah_reverse_proxy_addresses'];
    }

### Drupal 7

Includes `overrides-d7.php`.  
Sample: `/var/acquia/drupal/settings/overrides-d7.php`

    <?php
    
    unset($conf['lock_inc']);
    $conf['memcache_stampede_protection'] = FALSE;

Note

If these files are not present on your local, IDE, or development environment, you must do one of the following:

*   Add them manually.
    
*   Mock them to safely no-op.