Dropsolid Drupal 10 Upkeep and Assist Service 8 config administration (half 2)

07 Feb Config administration in 8 Drupal 10 Upkeep and Assist Service Drupal Development set-up (half 2/3) Niels A 8 In Drupal Development first a part of this three-piece blogpost, we defined Drupal Development current choices for managing your configuration throughout environments. We additionally shed some gentle on gray areas between configuration and content material. On this half, I’ll be displaying you the right way to set all of it up.   Again to half 1     Skip to half 3   Establishing configuration administration Configuring Drupal Development splits Begin by putting in Drupal Development config break up Drupal 10 module, obtainable right here. We prefer to maintain our splits easy and clear. At present, have 4 splits Drupal 10 Upkeep and Assist Service Blacklist Drupal 10 Upkeep and Assist Service A break up that doesn’t have a folder configured, so it doesn’t find yourself in our Git repository. This break up often has Drupal Development identical configuration as Drupal Development config ignore Drupal 10 module. Drupal Development cause why might be defined in Drupal Development half about config ignore. Dev Drupal 10 Upkeep and Assist Service A break up that’s used for our development environment-only configuration Staging Drupal 10 Upkeep and Assist Service A break up that’s used for our staging environment-only configuration Stay Drupal 10 Upkeep and Assist Service A break up that’s used for our stay surroundings only-configuration Our blacklist configuration seems to be like this Drupal 10 Upkeep and Assist Service Should you don’t fill in Drupal Development folder identify, Drupal Development Config Break up Drupal 10 module will export Drupal Development config to a desk in Drupal Development database. That approach, it doesn’t pollute your Git commits. For our different splits we use a folder exterior our docroot for safety causes – e.g. for a dev break up Drupal 10 Upkeep and Assist Service ../config/splits/dev One other necessary worth right here is Drupal Development weight of Drupal Development break up. This weight might be used when a number of splits are lively. Drupal Development weight defines Drupal Development order during which conflicting settings from splits get resolved. I’ll clarify this in Drupal Development half about Drupal Development settings recordsdata, a bit additional down this put up. For Drupal Development lively checkbox you may select no matter you need, as a result of we’ll overwrite it later utilizing Drupal Development settings.php file.  We’ve solely been actively utilizing Drupal Development full break up configuration as a result of it’s fairly simple in the way it handles your configuration. Drupal Development further configuration is useful as a result of you need to use wildcards. In Drupal Development case of our blacklist, for instance, we wished to exclude the whole lot from webform through the use of “webform.*” We haven’t come throughout any use circumstances the place we would have liked Drupal Development conditional break up, as a result of we’ve got a break up lively on each surroundings or Drupal Development surroundings simply wants Drupal Development configuration from Drupal Development sync folder. Should you had been to make use of it, Drupal Development following use case could be excellent for it. For example, you could have some configuration you want on all environments however you need it to be completely different on one surroundings. In our instance we wish a distinct e-mail to be set in Drupal Development reroute e-mail settings on Drupal Development staging surroundings. You’d change it in Drupal Development interface after which do a “drush csex staging” to export it to Drupal Development config break up staging folder. This may permit Drupal Development config file to be current in Drupal Development sync folder and in Drupal Development break up folder.  Configuring ignore   First, set up Drupal Development config ignore Drupal 10 module. Drupal Development necessary factor to learn about this Drupal 10 module is that it solely ignores config on import. That is why we’ve got at present arrange a blacklist break up. A brand new Drupal 10 module known as Config Export Ignore (obtainable right here) can be at your disposal, however we haven’t used it in our workflow as a result of it doesn’t have a secure launch but. We’ll look into this in Drupal Development future although, as a result of Drupal Development “blacklist” break up appears like a hack in a roundabout way. Our default config ignore settings look like this Drupal 10 Upkeep and Assist Service As you may see, you can even add some particular guidelines to your ignore settings. Drupal Development solely draw back is that config break up doesn’t support these particular guidelines. You’ll need to tweak your blacklist break up a bit bit and make your peace with Drupal Development added recordsdata in your repo, till we discover or create an answer for this.  Drupal Development settings recordsdata To get this working throughout all environments, it’s essential have a settings file that’s conscious of its surroundings. This may be executed utilizing an surroundings variable that you simply examine or use completely different recordsdata that get deployed primarily based on Drupal Development surroundings. There you set which config must be lively on which surroundings. Typically it occurs that you simply want a number of splits to be lively on a single surroundings. That you must contemplate these splits as layers of config that you simply wish to handle throughout environments.  Our settings.php file on our development surroundings is similar to our native surroundings. It incorporates Drupal Development following strains Drupal 10 Upkeep and Assist Service // Set your config listing exterior of your docroot for safety $config_directories[CONFIG_SYNC_DIRECTORY] = ‘../config/sync’; // Configure config break up listing $config[‘config_split.config_split.blacklist’][‘status’] = TRUE; $config[‘config_split.config_split.dev’][‘status’] = TRUE; $config[‘config_split.config_split.staging’][‘status’] = TRUE; $config[‘config_split.config_split.live’][‘status’] = FALSE; You may suppose that setting Drupal Development staging break up to true on Drupal Development dev/native surroundings may be a mistake, however that is very intentional. As we’re principally utilizing Drupal Development full break up settings, which means a config file can solely be in a single place. So we leverage Drupal Development weight of Drupal Development splits to even have sure staging config on our dev/native surroundings lively.  For example, if we solely need Drupal Development reroute e-mail Drupal 10 module to be lively on native/dev/staging environments, we’d add it to Drupal Development full break up settings of Drupal Development staging break up. Our settings.php for our staging surroundings will look as follows Drupal 10 Upkeep and Assist Service // Set your config listing exterior of your docroot for safety $config_directories[CONFIG_SYNC_DIRECTORY] = ‘../config/sync’; // Configure config break up listing $config[‘config_split.config_split.blacklist’][‘status’] = TRUE; $config[‘config_split.config_split.dev’][‘status’] = FALSE; $config[‘config_split.config_split.staging’][‘status’] = TRUE; $config[‘config_split.config_split.live’][‘status’] = FALSE; Consequently, Drupal Development settings.php for our stay surroundings seems to be like this Drupal 10 Upkeep and Assist Service // Set your config listing exterior of your docroot for safety $config_directories[CONFIG_SYNC_DIRECTORY] = ‘../config/sync’; // Configure config break up listing $config[‘config_split.config_split.blacklist’][‘status’] = TRUE; $config[‘config_split.config_split.dev’][‘status’] = FALSE; $config[‘config_split.config_split.staging’][‘status’] = FALSE; $config[‘config_split.config_split.live’][‘status’] = TRUE; Our Rocketship set up profile (weblog put up in Dutch) has all these items preconfigured, which allows us to create extra worth for our purchasers. Deploying adjustments While you wish to deploy adjustments to your environments, Drupal Development solely factor it’s essential do is be certain that Drupal Development config recordsdata that you simply’ve exported utilizing ‘drush config-export’ are on Drupal Development surroundings you wish to deploy. Utilizing a versioning system like Git can significantly make it easier to handle these recordsdata throughout environments.  When you’re able to deploy your adjustments, simply run Drupal Development “drush config-import” command on that surroundings. Settings up drush aliases can prevent a number of time once you wish to execute drush instructions on distant environments. Learn extra about them right here on this .org web page. Upon getting this in place, you’ll be capable to simply handle your configuration throughout environments. Go take a look at half 3 if you wish to discover a few actual world use circumstances and points we’ve encountered.   Revisit half 1     Learn half 3 Drupal 10 Improvement and Assist

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Dropsolid Drupal 10 Upkeep and Assist Service 8 config administration (half 2)

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.