Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

default_content

25,749 sites Security covered
View on drupal.org

Overview

Default content gives your module and install profile a way to ship default content as well as configuration.

8.x-1.x is powered by core's serialization, rest and hal modules. The new 2.x version uses a custom normalization format that is optimized for the use case of default content.

Features

2.x

The 2.x branch is actively developed and has the following improvements over the 8.x-1.x version. The new version is however still experimental and might missing some 8.x-1.x features, specifically extensibility and integrations through hal+json normalizers.

  • A more compact YAML-based normalization format
  • Identifiers like ID, revision id, changed and revision timestamps and other fields are no longer exported
  • Built-in support for composite entities like paragraphs in a single file
  • User 0/1 are no longer exported but referenced by ID
  • Support for translations
  • Support for files (stored as files in the same folder as the normalized file enitties, filename must be unique)
  • Support for entity references in link fields
  • Improved support for path fields including the pathauto skip flag

Importing of hal_json based default content is still supported, but exporting can only be done in the new format. Support for the old format will be removed in a future version.

Important

8.x-1.x

Supports entity-references between content.
Supports files if you have File entity
Easily export your content and its dependencies to yml using drush commands.

How does it work

Enable default content first. Any module that requires default content can put YAML (hal+json for 8.x-1.x) versions of the entities inside content/{entity_type} folders.

For example see default_content_test which has

  • modules/default_content_test/content
  • modules/default_content_test/content/node
  • modules/default_content_test/content/node/imported.yml
  • modules/default_content_test/content/taxonomy_term
  • modules/default_content_test/content/taxonomy_term/tag.yml

Requirements

Core only.

Known problems

Please use the issue queue to file any issues you encounter.

Credits

Written by @larowlan in response to Snowman session by @eaton and @yoroy.

Similar projects

Looking for a D7 solution? Try here

Related modules

Activity

Total releases
1
First release
Jan 2026
Latest release
3 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
2.0.0-beta1 Pre-release Jan 12, 2026