Import of existing page for local Development

I just received a Neos Website to work on and i am struggling to create a local copy of it.
The Webpage runs on Neos 5.3.

I have downloaded the Bitnami OVA. with Neos on a Debian 11 VM (Neos.Demo preinstalled) to avoid the install step. Now i am unable to import an existing Save-File of the page. After the command "./flow site:import --package-key “siteKey” --filename=“folder/Sites.xml”

I receive the following error: "During the import of the “Sites.xml” from the package “X” an exception occured: Error Package “X” specified in the XML as site resources package does not exist but the “resource Files” are all there assuming it means Images.

There is also a SiteResourcesPackageKey Error which makes no sense if the PackageKey is put in with the command…

I am assuming the error is related to the Version difference between the Neos installs.

Do i need to uninstall the Demo first? The Documentation is not ideal unfortunately.

(Dev Platforms previously tried: DDEV in WSL2 and also Xampp, both failed with recurring 500 errors because of the phpBinaryPath though it was defined multiple times)

Hi Tobia,

you should set up the site before importing:

./flow kickstart:site Package.Key siteName

next move the file Sites.xml and Resources directory you want to import to

DistributionPackages/Package.Key/Resources/Private/Content/

next import the site:

./flow site:import --package-key Package.Key

Don’t forget to give the site a domain:

./flow domain:add siteName-site yourdomain.tld --scheme https

1 Like

Thank you very much for the Info! After a few tweaks (also increasing php memory) i was able to get the import command to work.

The Page structure seems to have not been imported however. I suspect the xml file was not sufficient in transsrcibing NodeTypes.

Any way i can import the Page structure and components as well?

Regarding the Domain: since there was an existing Neos.Demo without a domain specified, would the importet page not also work without one?

The flow site:import command reads in the Sites.xml file reflecting the database of the import source. It doesn’t contain any NodeTypes so if your site to import utilizes some other NodeTypes than available thru Neos.Neos/Neos.Fusion itself or Neos.Demo you must get these NodeTypes first possibly by a Vendor.Site package from the source host.

On the other hand: if the site to import uses any NodeTypes with a different NodeType name you can edit file Sitey.xml and replace NodeType names.

Regarding site names: if you have more than one site in a NEOS installation w/o domain names NEOS always takes the first site (whatever this is) and you cannot reach the other one(s).

1 Like

Awesome, thank you again.

The last 2 questions:
The document-tree structure/site structure also needs to be imported separate from the xml?
If/when i get the custom NodeTypes, can i just paste them into the directory of the SitePackage?

The document-tree structure/site structure also needs to be imported separate from the xml?

File Sites.xml holds all site related data including site structure, node property data, dimension (languages)…

If/when i get the custom NodeTypes, can i just paste them into the directory of the SitePackage?

Yes you can. After setting up a site package by ./flow kickstart:site Package.Key siteName command. If you just copy a site package from one installation to another this won’t work. If you have a well done (running) site package somewhere you can copy it, add it to the root composer.json (in the “require” section) and run composer update.

Well, then i believe i’ll have to try a bunch of things. The “running” page Site package i have been sent is unfortunately this one, and it does not contain those files

Ask the person who sent you the “site” to do the following:

  • run command ./flow site:export --package-key Vendor.Site. Export files are written to DistributionPackages/Vendor.Site/Resources/Private/Content
  • zip the site package
  • send it to you

What you’ll have to do is:

  • unzip the site package so it is located at DistributionPackages/Vendor.Site
  • edit root composer.json and add "vendor/site": "*" line to "require" section. Please see composer.json file in directory DistributionPackages/Vendor.Site for the correct "name" entry.
  • run composer update in the NEOS root directory
  • run ./flow site:import --package-key Vendor.Site command
  • add domain for the site, if required :wink:

This should solve all.

1 Like