How to full clone plone site from a plone site and keep display all files?

For create a new site-B quickly, I copied a new site from site-A folder in the ZMI.

The files in folder site-B looks same as the folder of site-A in ZMI.

But it doesn't display any files or folders when I visit the localhost:8080/site-B, only keep the default main page and site settings of site-A.

I want to make site-A as a template plone site, that we can use it create may sites quickly.

Copying Plone sites through the ZMI is in general an unsupported operation - might work, might not work. In any case, you need to reindex the complete portal_catalog of the target site.

Also: And the same is needed for the relation catalog AFAIK (from @jensens)

As mentioned: rebuilding catalog will probably work.

It could be that if you delete (for example) an image on site A, the corresponding image (file) is not avalable on site B, so please check this before you start 'deleting things'

Please use for this case plone.distributions

Thank you, reindex does work.

Thanks, I'll try it.

Yes, you're right, rebuild is work. Site A shouldn't be delete, because links in page wouldn't change, and keep point to Site A.

What I mean is this:

  1. You have an image on site A
  2. This image is used on page 'SiteA/page'
  3. You duplicate the site
  4. The image will then be used on 'SiteB/page'.
  5. You delete the image on site A
  6. The image (blob file) might be missing from site B, in other words: missing from Siteb/page

( I saw this 10 years ago, when I used a similar approach to move a site to a different mount point )

And the same is needed for the relation catalog AFAIK.

But the whole process is not officially supported.

What works: Export a site as ZEXP and import it into a fresh Zope-server with the same configuration.

Just a note: If you rename the ZEXP and (for some weird reason) import it to the same zope, you will have to rebuild the catalog.

1 Like

Yes, because the siteB URL of image is still SiteA /image.png, that's why I had to keep siteA.