Is there any way to export content with paragraphs from one site and import to another?

Created on 22 April 2021, over 3 years ago
Updated 12 March 2024, 8 months ago

Problem/Motivation

I sometimes need to export content from one site and import to another, this would especially be useful for content with lot of paragraphs.

I have tried entity_clone, node_export, feeds, only content_sync seams to work but on enabling module it is taking hours on large site to create snapshot on install.

How do others handle this?

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇷🇸Serbia homoludens

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇻🇨Saint Vincent and the Grenadines Rhino-new

    Is there no way of doing this?

  • 🇬🇧United Kingdom macjules

    One of the best ways to do this would be to create a custom module to:

    1) Export the node and the paragraph configuration(s) using the core Configuration Manager.
    2) In the site you wish to import data to you will need to create a migration using the core Migrate module.

    There are a few guides out there on how to do this but in summary you want to.

      1. create your content type with a paragraphs entity reference field
      2. create your paragraph(s)
      3. add your created paragraph(s) to your new content type
      4. use drush to export your new configuration (drush cex)
      5. add those newly exported yml files to your custom module's config folder
      6. add content to this website
      7. Create a migration to import the node content ("Node Import")
      8. Create a sub_process for each paragraph you have included in the above migration so that the paragraphs migration will run as a part of the node import

      Destination website

      • Enable your custom module which will enable the configuration.
      • Visit the Structure > Migrate page and click 'Execute' beside the Node Import migration script
    • 🇧🇪Belgium blacksnipe

      Have you tried an approach with entity_share ?

      In my experience, this works very good.
      You just enable the Entity Share Server on the host website, and the Entity Share Client module on the underlying site(s).

      The only thing is, that your paragraphs fields should match across the sites.
      You can have extra fields in the "child"-site, but the same fields for the serving site are a requirement.

      Good luck. :-)

    Production build 0.71.5 2024