content_snapshot
Introduction
Do you want to be able to build your website from the scratch and fill it with content created by hand? This module will provide you with content importing/exporting capabilities suited for automated environments. You will be able to import/export content and move it around, share it with your co-developers, and create reproducible Drupal instances.
Using CLI you can install Drupal or use existing skeleton database, import configuration, and now additionally to that - import a content snapshot.
This module supports circular dependencies in the content
The goal is that after import/export cycle, the snapshot shouldn't change at all, so it can be kept in a VCS, and changes should be easily trackable.
Usage
See: README.txt .
What is NOT in this module's scope
- Importing/exporting content between different Drupal versions. Most of the time it should work without any issue, but it's out of scope of this module to ensure that you can import/export everything from anywhere to anywhere. The correct way of dealing with different Drupal versions is to import your content, upgrade your Drupal, and then re-export it again, that's the safest way to avoid any data loss. Feel free to seek help in the issue queue though.
- The same can be said about different versions of this module. Produced snapshots may not be compatible.
- GUI. This module is strictly for CLI usage. If we will provide GUI someday, it will be through a dedicated submodule. There are no plans for that right now though.
- Because the module is CLI focused it will also not expose snapshot to be downloaded. If you are using CLI you should be able to compress it and move around yourself.
This module supports:
- nodes
- users
- media
- content_translation
- layout_builder
- layout_builder_st
- paragraphs
- pathauto
- and more
Next plans:
- Support revisions.
Requirements
- Drupal 10 / 11
- Drush 11 / 12 / 13
- PHP >= 8.1
Other
If you like this module's code quality but would rather like to generate content programmatically, see my other module: https://www.drupal.org/project/content_fixtures .