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?

Comments

homoludens created an issue.

jorgefelico’s picture

Any luck with this? Running into the same issue with our site that has over 200 pages with a bunch of paragraph content.

mjchadwick’s picture

I'm working on a demonstration page that showcases all of our site's Paragraphs in their many versions, and I'd love to be able to make that page ONCE and then export it to another environment, but I'm having the same issue :-(

Rhino-new’s picture

Is there no way of doing this?

macjules’s picture

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.

  • create your content type with a paragraphs entity reference field
  • create your paragraph(s)
  • add your created paragraph(s) to your new content type
  • use drush to export your new configuration (drush cex)
  • add those newly exported yml files to your custom module's config folder
  • add content to this website
  • Create a migration to import the node content ("Node Import")
  • 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
blacksnipe’s picture

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. :-)