0

Is there a way to export and import content from one sulu (1.6) installation to another? Let's say from a staging system to the production version?

Rob
  • 14,746
  • 28
  • 47
  • 65
Andreas
  • 1,691
  • 1
  • 15
  • 34

2 Answers2

3

Maybe the doctrine commands will help you.

!!! IMPORTANT !!! THIS IS A FULL COPY WHICH DELETES EXISTING DATA FROM TARGET INSTALLATION

Export from Staging:

bin/adminconsole doctrine:phpcr:workspace:export -p /cmf cmf.xml
bin/websiteconsole doctrine:phpcr:workspace:export -p /cmf cmf_live.xml
bin/adminconsole doctrine:phpcr:workspace:export -p /jcr:versions jcr.xml

Delete everything in the target installation (in your case production):

bin/adminconsole doctrine:phpcr:node:remove /cmf
bin/websiteconsole doctrine:phpcr:node:remove /cmf
bin/adminconsole doctrine:phpcr:node:remove /jcr:versions

Import into the target installation:

bin/adminconsole doctrine:phpcr:workspace:import -p / cmf.xml
bin/websiteconsole doctrine:phpcr:workspace:import -p / cmf_live.xml
bin/adminconsole doctrine:phpcr:workspace:import -p / jcr.xml

Also don't forget to copy the database and your uploads folder (var/uploads/)

Quehnie
  • 46
  • 3
0

Sorry but this question is too unspecific and not really sulu related. So the base answer is "yes".

sulu itself doesn't contain a service for this. This is mostly because your data can be very different and you can't really write something agnostic that fits any use case.

Still you are using symfony and the PHPCR. Of course you can export to basically format and import again. But how to do that has to be implemented on your site.

Kars-T
  • 1
  • 1