Restructuring Drupal Content with Migrations and Paragraphs

Coding
StockSnap / Pixabay

Jaymie Strecker describes a real-world Drupal migration used to refactor how creator data is stored across multiple content types. Over time, the site had accumulated different structures for representing authors and creators, making maintenance and theming difficult. The solution was to migrate content from an old article type that stored creators as taxonomy terms into a new article type that uses nested paragraphs. This unifies the data model and allows new content types to reuse the same structure and presentation.

The post explains how the create_default_paragraph_revision process plugin from the Migration Tools module is used to generate paragraph entities during the node migration. Jaymie details how sub_process, multiple_values, and callback plugins are combined to iterate over taxonomy terms and wrap each value in a single_creator paragraph inside a creator_list paragraph. The article also covers Drupal 10 and Drupal 11 differences, rollback behaviour, and alternatives for modifying existing nodes instead of creating new ones. The example demonstrates how Drupal migrations can be used not only for imports but also for internal content restructuring.

Disclosure: This content is produced with the assistance of AI.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Upcoming Events

Latest Opportunities