… assuming you’re using Neos 9 of course.
Because Neos 9 stores the most important information for any website in cr_default_events - where “default” is the content repository id - its often possibly by just cloning that to your local system that you get quickly a development setup.
I’ll not describe the again how to export the events table and how to import it locally. For that please see the steps 2 to 5 from:
Let’s get startet
- Get and install the sources of the project
Or use a plain empty Neos installation without site. It is possible to replay the events without the projects sources! This can be helpful if you just want to debug one projection.
- Run
./flow setupand setup your system as regular
But dont import or setup a site yet.
-
Run
./flow cr:setupto create the empty tables well import into among thesecr_default_events -
Apply the steps 2 to 5 from my other guide to fill the events table
-
Run
./flow subscription:replayAllto replay the projections -
Connect non event-sourced state to the new content repository
While we have the content graph now replayed there is no traditional Neos site entity and some permissions are missing.
Connect traditional Neos site entity
Go to your events table and find the event that creates the site root node. That event is among the first NodeAggregateWithNodeWasCreated. Remember the nodeName and nodeTypeName. Also decide which site package the site should belong to and run:
./flow site:create --package-key <sitePackage> --name <nodeName> --node-type <nodeTypeName>
This will attach the existing site node from the content repository to a new traditional Neos site entity. If we would have run that command before the import it would have created also an empty site node and workspace which we dont want.
(Technically nodeTypeName is obsolete but still required by the arguments, see issue)
Set default Neos workspace permissions
Now you should be able to open the site in the frontend but receive:
Read access denied for workspace "live"…
To allow live to be seen by everyone and edited by editors run
./flow workspace:assignrole live "Neos.Flow:Everybody" viewer
./flow workspace:assignrole live "Neos.Neos:LivePublisher" collaborator
- You’re done
