Categories

(83)
(69)
(8)
(34)
(74)
(149)

Drupal 8 configuration management: really easier and faster

18.10.2016
Drupal 8 configuration management: really easier and faster
Author:

It’s a joy to see how Drupal 8 fulfills its promise of becoming more convenient in every way! We’ve discussed how it respects web accessibility standards, facilitates product management with the Inline Entity Form module, uses the BigPipe module’s power to make sites load faster, and much more. Great improvements have also touched the configuration management issue. This will be today’s topic for discussion.

Configuration: a glimpse at what it is

Configuration includes any elements on your site that are configurable other than your content. Among them are: module and theme settings, display modes, widget and block placement, navigation menus, content types, taxonomy vocabularies and many more. You realize just how many there when you need to get something changed around :) For example, when you need to move your configuration changes between your site’s environments (dev, test, and live).

A new handy configuration management system in Drupal 8

In Drupal 7, sharing your configuration to your site’s versions used to be a daunting task. So, one of the main initiatives for improvements in Drupal 8 was to create a convenient configuration management system.

Now it’s done! The Configuration Management Initiative (CMI) has been successful. Congrats to all of us, because we now have a functional configuration management system built into the Drupal core that lets us store, modify and move our configuration data quickly and easily.

Manage your configuration in files

By default, your configuration settings are stored in the database. However, Drupal 8 offers the possibility to convert them to code and store them in files instead. It’s as simple as that: export your configuration from database to files, and, when you deploy it, just import it to the database of the new environment. For example, you can make some changes on your dev site, export them to files, deploy on your test site and import to the test site database, and so on.

For managing your configuration in files, the Configuration Manager module or the Drush command-line tool could be very useful to you.

Using files for configuration management is really time-saving. You no longer have to remember what has changed, say, on your dev site, and repeat these changes on your test site and your live site. Moreover, the process can be made automated. It’s also a really good idea to make it version-controlled.

Working with the same website and different websites

The new configuration management system is designed to facilitate moving your configuration from one version of your site to another, but NOT between different sites. So please keep in mind that the UUID values of the source and the destination sites should match. Only then can the configuration management work.

However, nothing is impossible in Drupal, and if you wish to migrate configurations from one site to another, you could try Drupal 8 Features Module — which, by the way, offers some extra flexibility that the CMI does not yet have.

By the way, an in-depth overview of configuration in Drupal 8 with lots of technical details was done about a year ago by our Drupal developers. Check out!

Have questions, need assistance, want a new website? We are always glad to hear from you and configure our efforts to exactly fit your needs ;)

5 votes, Rating: 4

Read also

1

Simple but powerful, the Views is the most popular module, installed on over two-thirds of Drupal sites. So we are happy to include it into our expanding collection of Drupal 8 module recaps which...

2

Rules are everywhere: at school, at work, in life in general ... and there are some Rules in Drupal 8 as well! Although it’s definitely not what you think it is :)

3

So, Drupal does not seem inclined to stop migrating modules any time soon, and we are not complaining. So much information to explore, so many things to share with you guys. And this time we’re...

4

Sometimes 404 errors are hard to avoid, and which can significantly slow a website down. Luckily, there is the Fast 404 Drupal 8 module that prevents it.

5

E-commerce in Drupal 8 is a topic of interest for many developers. If you are among them, you’ve come to the right place — our Drupal developer has written a blog post on the Commerce 2.x module....

Subscribe to our blog updates