We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
80
votes
7answers
8k views

Suggestions for settings.php - Local dev, Development server, Live server

Basically, one of the greatest questions of all time: What are some ways you're using settings.php in your development/staging workflow? Right now, I have my settings.php file set up like the ...
49
votes
7answers
34k views

How can I import the configuration on a different site?

I have this error when I try to import the config of an another site: The staged configuration cannot be imported, because it originates from a different site than this site. You can only ...
41
votes
13answers
28k views

How do I remove a configuration object from the active configuration?

I'm writing a custom module for Drupal 8. It defines a field storage configuration object, in a file called modules/mymod/config/install/field.storage.bloom_stem.bs_twitter_ac.yml. The problem is ...
33
votes
6answers
11k views

How do I update the configuration of a module?

I'm building a custom module in Drupal 8. It includes some YAML config files. As I develop I need to change and add to the config, e.g. to add another field onto my custom entity. At present the ...
26
votes
9answers
4k views

How to prevent Devel module to be installed on production environments

Using the new Drupal 8 Configuration manager, how can I prevent it from installing the Devel module on certain environments? As far as I know, installing it on my local means the next time I export ...
21
votes
3answers
14k views

How do I set a variable in the configuration file setting.php and use it from code?

How do I set a variable in the configuration file setting.php and use it from code?
20
votes
3answers
11k views

Import a single yml configuration file

Is it possible to import one single yml configuration file by specifying its path? Or a group of yml files contained in a specific module?
18
votes
1answer
712 views

Technical advantages of either Configuration or Features over the other?

In short, Configuration vs Features, in Drupal 7, fight! As always, technical advantages, or other hard facts, as we don't do discussions here. Drupal 7 specific to limit to scope, as CMI vs Features ...
16
votes
7answers
8k views

Exclude configuration from import/export

I thought this was a simple use case of the new Configuration management system, but I haven't had any luck finding out how to solve this: Problem I want to store configuration in git and use drush ...
15
votes
3answers
324 views

How do I deploy/manage similar sites from an unique profile, without dumps?

I do not like the "cloning website" solutions which implies dumping a database and importing this dump in another environment. This does not look like a real world way of deploying several instances ...
13
votes
2answers
3k views

What are cloned sites in Drupal 8?

When trying to export my site configurations from one Drupal 8 site to other I keep getting the following error The staged configuration cannot be imported, because it originates from a different ...
11
votes
2answers
5k views

Exporting fields for content type

The configuration export feature of Drupal 8 would seem to be a very useful feature. However, I'm not sure I completely understand how it works. For example, if I do a single export, choose "Content ...
10
votes
1answer
4k views

How to remove mymodule configurations on uninstall [duplicate]

I have created a custom module and created a yml file to create a menu system.menu.custom_menu.yml id: custom_menu label: 'Custom menu' description: 'Custom menu.' langcode: en locked: true ...
10
votes
7answers
15k views

Looking for Acquia Dev Desktop database settings

I am using Acquia Dev Desktop to create local Drupal installations. I am also using Bluehost as a service. Unfortunately, Bluehost uses table prefixes for Drupal tables. So, if I import something ...
10
votes
1answer
2k views

What order should configuration import and module updates be run?

Since the schema version of modules is stored in the key-value storage, it is unique to each site and is not synced through configuration management. That makes sense, since updates may need to make ...
10
votes
2answers
797 views

Best way to delete all variables when uninstalling module

I'm writing a module that writes several variables (three, four variables for every content type, and other). Which method should I use to delete them on hook_uninstall? Is it safe to perform a ...
10
votes
2answers
5k views

Drupal Master/Slave Replication

I've setup two MySQL servers with Master/Slave replication for the drupal database and I've confirmed the databases are in sync and replicating. I am now trying to point drupal to both databases ...
9
votes
4answers
23k views

How do I set variables for variable_get()?

I am trying to understand variable_get(). I read so far that you can set variables in the settings.php using the $conf array and retrieve them later in code by using variable_get(). I have read that ...
9
votes
2answers
5k views

Configuration export/import doesn't work

I did a drush config-export staging on a local version of my site then a drush config-import staging on the server. It imported all the taxonomy vocabulary but no terms. I also tried it via the UI (...
9
votes
4answers
6k views

Export menu configuration [closed]

Looking for a way to export menu configuration. The Configuration management system will export the menu itself, but not the menu links configuration. I am looking for a way to put one of those mega ...
9
votes
2answers
743 views

How do customize settings.php during installation profile

I'm creating an installation profile for my current company internal project. During the installation process, one of the custom modules crashes during init(), since it tries to use one global ...
8
votes
2answers
8k views

Drupal 8 variable_get

I have some code in Drupal 7 what are using variable_get. Now I would like to write the code in Drupal 8. So I was reading this but its didn't help me a lot. How to write this code in Drupal 8 from ...
8
votes
2answers
605 views

Best practice for custom module variable names?

I've gotten into the habit of doing pretty robust configuration panes for my modules now, and I'm finding the variable names & management to be quite the pain. I have variables like ...
8
votes
2answers
390 views

Why is settings.php in the web folder?

In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a ...
8
votes
2answers
781 views

Features versus Configuration Management

I am building a Drupal 8 site and I have done some research whenever I should use Configuration Management or Features to export configuration and include it in my profile. In order to export and ...
7
votes
5answers
7k views

Unable to install the XYZ module since it requires the A module

When running (right after site install) the drush cim -y command, the following error appears: Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in ...
7
votes
1answer
2k views

Best Way to Handle Variables Per Environment

I have a custom module. It's FormBase to create a form. And on submit, I post values to an API. All this works. But I want to change the base URL variable (which is used in multiple methods) so that ...
7
votes
3answers
9k views

Site UUID in source storage does not match the target storage

When I run drush cim -y on my staging instance of my site I get the following error: Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in Drupal\...
7
votes
2answers
2k views

How to export translated variables settings in code?

In a custom module I define several configuration variables by implementing the Variable module's API. The module is part of a multilingual site project, so some of these variables should be ...
7
votes
2answers
1k views

Change .gitignore file for sites/default/files/config

I'm checking out the new configuration management module for Drupal 7. It's effectively a back-port of the new configuration management that's in D8, and looks like it's going to be a great ...
7
votes
0answers
1k views

How do I translate theme settings?

How do you translate custom theme settings in Drupal 8? I use hook_form_system_theme_settings_alter to add custom settings to a theme. One setting is the text string (e.g. 'Menu') to display beside ...
6
votes
3answers
3k views

Moving Host - concern about PHP memory limit

I'm moving my projects from Bluehost to GreenGeeks, and I'm concerned about the Drupal (v7) PHP memory limits. Maybe I'm overly concerned, but has anyone experienced any issues with GG or BH about ...
6
votes
2answers
4k views

How to override configuration from a file?

I have been playing a lot lately with an import configuration to Drupal 8. And I notice that all documentation show you how to edit value per value instead of overriding the entire config file. You ...
6
votes
1answer
927 views

Are configurations written and read directly to/from .yaml files or still to the database?

Background Drupal 7 and previous versions have attracted criticism for Drupal web site admin configuration being stored in the MySQL database, the criticism being that being in a database means that ...
6
votes
1answer
1k views

When to use mapping or sequence to define an array in a schema file?

I need to define an array in my onlyone.settings.yml file to store this values: onlyone_node_types: book: book test: test In my onlyone.schema.yml file I have this: module.settings: type: ...
6
votes
3answers
1k views

How to add the configuration changes from a website to another website?

This is what I'm trying to do: I have a website A where I make configuration changes and add other stuff. Now I create a website B. I would like to add the configuration changes from website A to ...
6
votes
2answers
2k views

Is there a module for tracking changes to a Drupal site's configuration? [closed]

I want to create a simple system for tracking changes to my Drupal configurations and knowing which modules are used by some configuration settings is crucial, but will be happy to use an existing one ...
6
votes
2answers
795 views

Disabling module with config sync and removing with composer

I have an issue disabling modules, I've searched but cannot find something useful: - Developer A disable module and via composer remove it - I pull his changes so i run composer install that remove ...
6
votes
1answer
874 views

How to delete a particular variable from a configuration created by a custom module

I have created a custom module and a configuration say 'abc_settings'. This configuration creates a variable for each vocabulary present on the site like vocab1_options, vocab2_options, vocab3_options ...
6
votes
2answers
1k views

Module uninstall dependencies

I'v got a question regarding dependencies & configuration. I created a module providing a content type, field type, widget & formatter. While wanting to uninstall the module, I get the ...
6
votes
2answers
3k views

How to enable modules through configuration?

I am trying to enable modules by adding them to core.extension.yml file without getting involved with Features, Configuration Installer or similar modules or profiles. The modules are enabled but ...
6
votes
1answer
1k views

How to disable modules using config split?

I have created different split for each environement (local, dev, test, prod) using the Configuration Split module. How can manage modules (enable/disable) in each environment? Should I keep core....
6
votes
1answer
531 views

Configuration successful but never gets imported

I have some changes in core.entity_form_display.node.news.default. When I run drush cim -y it says it is successful but it actually never imports it. drush cim -y Collection ...
6
votes
5answers
5k views

How can I export a group of settings in Drupal 8

Drupal 8 has this new configuration management tool at /admin/config/development/configuration. I have an experimental site running Drupal 8 beta14, and I want to import a few settings into my new ...
6
votes
1answer
3k views

Will changing the value of $drupal_hash_salt in settings.php file break site

I was looking through a list of steps to take when there is a risk that your site has been hacked. It recommends changing the value of $drupal_hash_salt in settings.php. According to the inline ...
6
votes
1answer
103 views

How can I enforce maintenance_mode at all times in a specific environment?

In Drupal 7, we could override the $conf variables in settings.php to force a site (e.g. development) in maintenance mode. In Drupal 8, this has changed to $config, but the maintenance mode variable ...
6
votes
2answers
273 views

Configuration management with different database and websites

We have a central code base (Git repo). From this code base we deployed several websites already. Till now we used features. The websites which are already in production they have a filled database ...
5
votes
2answers
1k views

Manage config translations programmatically

My module creates and manages some config_entities programmatically (ie. not through an EntityForm) in response to associated content entities being saved. In order to handle multi-language content ...
5
votes
2answers
16k views

Can't edit settings.php in Drupal 7 - Premission Denied - Can't Write to File via Cpanel File Manager

Trying to edit settings.php via Cpanel File Manager I can CHMOD the file to anything I want and back but can't write to it. I get the following message: Could not write /home/testing&#...
5
votes
1answer
2k views

Drupal reuses its hash salt

The instructions in default.settings.php say This variable will be set to a random value by the installer. All one-time login links will be invalidated if the value is changed. Note that if ...