Topic
Last updated August 18, 2017

The Configuration API allows module developers to access and provide configuration data for a Drupal site. As a module developer, you will need to know how to access configuration data stored by your module, provide default configuration, create a settings form for site administrators to edit configuration, and other tasks such as overriding settings for a local environment. See also the related topic, Manage configuration and workflows.

Example tasks

  • Provide default configuration for a module
  • Create a configuration settings form
  • Override settings per environment
  • Create a configuration entity

Confidence

The Configuration API has been in a stable state since the initial release of Drupal 8.0.0.

Drupalize.Me resources

More Guides

We have guides on many Drupal skills and topics.

Explore guides

External resources

  • Configuration API (drupal.org)
    • Configuration API concepts and best practices. Start here if you're not familiar with the concept of configuration.
  • Configuration API (api.drupal.org)
    • Technical documentation for the Configuration API.
  • Advanced Drupal 8 Configuration Management (CMI) Workflows (blog.liip.ch)
    • How to solve common issues in a deployment workflow with Drupal 8 configuration management. For example, how to enable a module on a local dev environment but not on other environments or how to prevent config created on the live site, such as webforms or contact forms, from being deleted when new config is imported.