We have modules that are only used for local development like Stage File Proxy. How would I prevent these modules from being added to the configuration management?

  • No idea on the real answer, but as a workaround you could gitignore the configuration output of these modules.
    – cilefen
    Jul 2 '16 at 16:36

From Dave Reid on Twitter

Ignoring Development Modules

If you have a certain list of modules that should only be enabled on the development or staging server, then this may be done with the built-in --skip-modules option in the config-export and config-import commands.

For example, if you want to enable the 'devel' module on development systems, but not on production server, you could define the following configuration settings in your drushrc.php file:

# $command_specific['config-export']['skip-modules'] = array('devel');
# $command_specific['config-import']['skip-modules'] = array('devel');

You may then use drush pm-enable to enable the devel module on the development machine, and subsequent imports of the configuration data will not cause it to be disabled again. Similarly, if you make changes to configuration on the development environment and export them, then the devel module will not be listed in the exports.


  • Thanks this worked. At first I thought this wasn't working but it turns out that the configuration file still gets created but it doesn't add the module to core.extension.yml so the module won't get enabled on other environment!
    – albertski
    Jul 2 '16 at 21:02
  • Actually I don't think this worked. All it does is not add the module to core.extension.yml and if someone runs the drush cim -y command without having the module enabled they get the following error (see below comment):
    – albertski
    Jul 5 '16 at 13:58
  • Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in Drupal\Core\Config\ConfigImporter->validate() (line[error] 728 of /var/www/xmd8/www/core/lib/Drupal/Core/Config/ConfigImporter.php). The import failed due for the following reasons:
    – albertski
    Jul 5 '16 at 14:00
  • Configuration <em class="placeholder">devel.settings</em> depends on the <em class="placeholder">Devel</em> module that will not be installed after import. Configuration <em class="placeholder">stage_file_proxy.settings</em> depends on the <em class="placeholder">Stage File Proxy</em> module that will not be installed after import.
    – albertski
    Jul 5 '16 at 14:00
  • This is the correct answer. There is an issue with Drush that is causing this: github.com/drush-ops/drush/issues/1820
    – albertski
    Jul 12 '16 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.