Skip to content

Drupal Recipes

I need to... Guide Summary
Understand what recipes replace Recipe System Overview Use Drupal Recipes (core since 10.3.0, May 2024) when you need shareable, tested configuration patterns that can be applied to any Drupal site. Use distributions for full site builds, config split for environment-specific config.
Create my first recipe Creating Your First Recipe Follow this workflow to create a minimal working recipe from scratch.
Understand recipe.yml structure Recipe YAML Schema Every recipe requires a recipe.yml file defining metadata, dependencies, extensions, configuration, inputs, and content.
Compose multiple recipes Recipe Composition & Dependencies Use recipe composition when you need to build complex functionality from granular, reusable recipe building blocks.
Install modules/themes Extension Installation Use the install: key to declare modules and themes that your recipe requires.
Import configuration Config Import & Strict Mode Use config.import to specify config files to copy from extensions. Use config.strict to control validation of existing config.
Update simple config Config Actions - Universal Use universal config actions when you need to update simple config or config entities without entity-type-specific methods.
Grant permissions or configure entities Config Actions - Entity-Specific Use entity-specific config actions when you need to configure roles, text formats, displays, workflows, or other specialized entity types.
Chain config actions Config Actions - Advanced Patterns Use advanced config action patterns when you need wildcards for bulk operations, optional config handling, chaining multiple actions, or input substitution.
Define user inputs Input System - Defining Inputs Use inputs when you need to externalize site-specific data that varies per environment, making recipes portable and reusable.
Set default input values Input System - Default Sources Use default sources to provide fallback values when inputs aren't explicitly collected from users.
Collect input from users Input Collection & Forms Use input collection when you need to gather user-provided values interactively before applying a recipe.
Decide between default content and migration Default Content - Overview Use default content when you need demo or starter content bundled with your recipe. For ongoing content staging, use Workspaces or Migrate API.
Export content Default Content - Exporting Use content export when you need to bundle existing content entities with a recipe for demo or starter content.
Import content Default Content - Importing Recipes automatically import default content from the content/ directory during recipe application via RecipeRunner.
Publish a recipe Composer Integration & Publishing Use Composer packaging when you need to distribute recipes with version management and dependency resolution.
Use recipe tooling Recipe Tooling Use recipe tooling when you need to apply recipes, export content, or integrate recipes into custom workflows.
Browse core recipes Core Recipes Catalog Browse core recipes when you need reusable building blocks or want to learn recipe patterns from tested examples.
Follow best practices Best Practices & Patterns Apply these practices when creating recipes to ensure maintainability, reusability, and testability.
Avoid common mistakes Anti-Patterns & Common Mistakes Avoid these anti-patterns when creating recipes to prevent brittle, untestable, or unmaintainable code.
Ensure security and performance Security & Performance Apply security and performance best practices when creating recipes to ensure safe and efficient recipe application.
Find recipe classes Code Reference Map