Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reinstal module configuration for Drupal 8
drush php-eval "\Drupal::service('config.installer')->installDefaultConfig('module', 'module_name');"
@pcambra
Copy link
Author

pcambra commented Feb 14, 2019

$config = file_get_contents($config_path);
$data = Yaml::parse($config);
// Update the stored configuration.
\Drupal::configFactory()->getEditable($configKey)->setData($data)->save(TRUE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment