When Drupal 8 was released, it came with Configuration Syncing functionality. This has been a staple ever since for Drupal 9, Drupal 10, and beyond. Configuration Syncing was a game changer and one of my favorite features in Drupal Core.
The days before config sync
Let’s go back to the distant past: Early 2015. Remember, the web moves quickly, so 8 years ago is pretty long.
The year is 2015, a client wants a whole new feature released. I make a new content type, configure every field, every output, and every form setting. I create Views to output lists and new blocks for the homepage. Not wanting to disrupt and possibly break a production site, this was all done on a Staging website. Good news: the client loves it!
The client wants it deployed immediately. So I begin the process. I look at my notes of where I modified Staging. I bring up the many configuration pages on Staging and meticulously re-create every change on Production. It takes hours as I manually look at each configuration page of Staging and compare it with Production.
I’m done! I let the client know the feature is now available on the live site. The next day, the client notices something is off on one page. Turns out I missed one check box on a configuration form during my manual review of the Staging site. Easy fix, but embarrassing that it was missed.
In short, deployments were tedious with a lot of room for human error in 2015.
The golden days of Config Sync
Now let’s review the same scenario with Configuration Syncing (a core feature of Drupal 8, 9, 10, and beyond).
Like before, I add the new feature to the Staging site, the client is thrilled and approves it immediately. We then schedule a time to deploy to Production. When that time comes, I don’t need to spend hours manually re-creating each piece on Production. Instead, I go to Staging and tell it to export all configurations as a set of files. I then move those files to Production and tell it to import. This time when the client goes to their site the next day, they are delighted to see their new feature up and running. Success!
What is Config Sync
We’ll start with: What is a website? To me, as a developer, a website is usually a collection of files and a database. Some of the files are code and some of the files are content. The database is a mixture of configuration changes and content. The setting that specifies that a list should have 10 items before paging is a configuration setting. The 20 items in the list are content in the database.
Configuration Sync allows a developer to export the configuration settings from a database into a collection of files. Those files can then be used to import into Drupal.
In short: Configuration Syncing allows for the easy transfer of configuration changes from one Drupal instance to another.
Other scenarios where Config Sync can save the day
Uptime: Nothing can go wrong with Production!
Some clients have thousands of users conducting business activities on their websites. Any downtime is noticed. Any issues are noticed. All of these bugs will impact the user's experience, which in turn negatively impacts the Client's reputation.
In cases like this, we can lock down all configuration settings on Production. This way no one can modify the database of the live site, eliminating the possibility of breaking the site which will aggravate visitors. All those changes MUST be done on a Staging site, reviewed, approved, and only deployed via Config Sync.
Efficiency: Save time and money with faster deployments
Every site that uses Configuration Syncing has the advantage of deployment speed. Config Sync shines even more in this scenario due to the quick import of the changes vs a human making the changes.
Since the deployment can be done with scripts rather than manual human changes in an interface, the deployment times become much shorter.
Safety Net: Empowering the tech-savvy client
CommonPlaces helps a variety of clients, from the non-technical to the tech-savvy. We strive to empower our clients. Some take advantage of that. The benefit of Config Sync is that it will show what’s changed on Staging that hasn’t already been exported to Production. This provides the opportunity to empower our clients to make updates and grant our team visibility into those updates.
Before we deploy security updates or changes to Production, we always look at the current changes to configuration since the last update. I’ve run into situations where I can see a client has done substantial work on their own. Sometimes, I can catch a potential issue. For example, a permission setting that should be updated. Other times, I can point out there is a module that will help them accomplish a goal.
Config Sync is a powerful tool in the toolbox of all modern Drupal websites. And while most clients never see it or use it. They are benefiting from CommonPlaces being experts in that tool.
To get more insights from CommonPlaces be sure to sign up for our blog!