Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The fixtures module imports content created in YAML files. Nodes, menu items, taxonomies and other initial content are created as a batch.
At this point the menu system and nodes are implemented, but require improvement and support for custom fields. This is a work in progress.
Example in sites/all/fixtures/menu.main-menu.yaml:
custom-menu:
title: Custom menu
description: A custom menu, used for main navigation
items:
item-about-me:
title: About me
link: general
items:
item-general:
title: General
link: general
item-resume:
title: Resume
link: resume
description: A single-line description
Prerequisites
The Libraries module must be installed together with the Spyc library in the folder sites/all/libraries (or subsite folder). Spyc is a loader/dumper library for YAML.
If you want to import the basic content, move the files in the examples folder to sites/all/fixtures folder. Edit them to match your specific needs and run the command drush fixtures-all