Skip to content

Instantly share code, notes, and snippets.

@vincenzodibiaggio
Last active October 7, 2015 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincenzodibiaggio/1af1ed401d31264b0f08 to your computer and use it in GitHub Desktop.
Save vincenzodibiaggio/1af1ed401d31264b0f08 to your computer and use it in GitHub Desktop.
Drupal 8 (from beta 16) enable file configuration before install

At this moment ( 8.0.0-beta16 ) to switch to file configuration before install Drupal:

Into settings.php Uncomment

    $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');

then add:

    $config_directories = array(
      CONFIG_ACTIVE_DIRECTORY => 'PATH_OUTSIDE_WEB_ROOT/config/active/',
      CONFIG_STAGING_DIRECTORY => 'PATH_OUTSIDE_WEB_ROOT/config/staging/',
    );

In sites/default/services.yml add:

    services:
      config.storage:
        class: Drupal\Core\Config\CachedStorage
        arguments: ['@config.storage.active', '@cache.config']
      config.storage.active:
        class: Drupal\Core\Config\FileStorage
        factory: Drupal\Core\Config\FileStorageFactory::getActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment