Drupal Configuration API

The configuration API provides a central place for modules to store configuration data. This data can be simple configuration like your site name, or more complex information managed with configuration entities, such as views and content types.

By toswebdev, 29 August, 2022

There was a severe problem I faced the other day. I imported the configuration into my production environment. The configuration files I had saved for my module were overwritten by my development environment's configurations.

Information that needs to be synchronized between development and production is stored in configuration. When a site is being built, this information is often generated by the builders, not by regular users.

Instance-specific variables should be stored using the State API rather than the Configuration API.