-1

I am looking for suggestions on the right way of moving configurations and code from Dev to Staging to the Production environment for Drupal 8 Site. I also need to set up a Reference environment which will be a replica of the production environment but on a server with less resources.

I am using git for code, so it is an easy task to move code changes around.

The site is developed iteratively, hence I need to deliver content types, views and display in an iterative manner to the production site, which will have content already present based on the previous iteration.

I can see some documentation on this topic but all of them are about Drupal 7 or earlier versions.

Any help/suggestions or pointers will be appreciated.

0

This is a good start, drupal 8 has inbuilt configuration import/export functionality: https://www.drupal.org/docs/8/configuration-management/managing-your-sites-configuration

You could automate/speed up the process abit by adding the exported configs to your git repository and using drush to create them

But its especially: do an export on your dev which will generate config files all zipped up. Then do an import on production which allows you to review the changes before actioning them

  • Thanks. However, the configuration -> Export is giving only two option -All or individual. I dont see any option to select the required items (views, content types etc) in one go. – Sensimple Mar 6 '18 at 11:36
  • Yeah thats right, usually you'd do a full sync as you'd want your dev/staging/production to stay aligned with the same configuration and just different content. Features is supposed to be for transferring/reusing functionality between separate sites but does have it uses sometimes for same site environment syncing – Leigh Mar 6 '18 at 11:54
0

Found the solution in the Features module!

https://www.drupal.org/project/features

The video https://events.drupal.org/losangeles2015/sessions/features-drupal-8 is quite useful.

PS: thought this will be of use to someone else in future

  • IMHO Features is not designed for that purpose, deployments should be done as a full import. Either don't make configuration changes on production, or if it can't be avoided (e.g. if users/editors can create/customize things that are stored in config like contact forms or webforms) then there are various options, like simply merging with git (work on a feature branch, before deploy, export config, commit to production branch, merge in feature branch, test import on staging site, then deploy to prod) or use modules like config split/ignor – Berdir Mar 7 '18 at 14:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.