1

Is there a way a person can ensure that if he makes a change to a drupal 8 website via the UI (e.g. Adding/modifying a field to a content type, creating/editing a view) that this can be automatically applied to another developers localhost on the git pull or on a staging/production server?

Currently (I have moved from Drupal 7) I am doing this manually which is a pain. I've been told that Features is the way to go from Drupal 8 (and Drupal 7 apparently).

2

In D8, this is done by configuration synchronization (the config_sync module).

The entirety of the configuration (fields, views, formats, block layout, etc) can be exported to YAML files, and imported on another installation (which should be using a copy of the original database).

There are several ways to do this, but since you already mention git, one of the cleaner ways to do it is to run drupal config:export in Drupal Console, and add the resulting directory (which should be in sites/default/config by default, but this path can be changed) to your git repository, and import it with drupal config:import on the other installation after pulling.

(Content, even taxonomy and content blocks, isn't exported unfortunately, which may break your block layout and taxonomy filters in views.)

2

Features in D8 is the way to sync features across multiple sites. And was the default in D7 to import and export database changes. Which in D8 is solved by Configuration management.

Please read the docs (thoroughly): Managing your site's configuration.

You routinely have to drush cex after you've made changes via the UI. This will export database values into multiple (hundreds/thousands) *.yml files. Then your colleagues will have to drush cim after they pulled the latest *.yml files to get the changes imported into their DB.


For a general overview please see Web development structure on multiple devices.

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.