Site Factory is a site management User Interface, integrated with Admin UI. It enables you to configure sites without editing:
- SiteAccess configuration
- multisite configuration
After clean installation the Site Factory will be disabled. If you are not working on a clean installation, follow Upgrading eZ Platform to v3. This results in the following message on the Site tab: "There is a design configuration error, and you will not be able to create a new site. Please update the configuration." If you plan to use Site Factory you need to enable and configure it.
To enable or disable Site Factory, follow respectively:
Enable Site Factory¶
To enable Site Factory you need to set
Next, configure Site Factory by adding empty SiteAccess groups, only one empty group is mandatory. The number of empty SiteAccess groups must be equal to the number of templates that you want to have when you create the new site.
In this example, you add two SiteAccess groups (
example_site_factory_group_2) that correspond to the two templates (
ez_site2) that you will add in the next step.
Under these groups you configure all the settings that do not expose the UI, e.g. the Content view.
Add groups in
1 2 3 4 5 6 7 8 9 10 11
Uncomment the SiteAccess matcher by removing the comment from
EzSystems\EzPlatformSiteFactory\SiteAccessMatcher matcher under:
1 2 3 4
ezdesign defines templates for your sites, so add them before continuing.
Next, add the configuration for
ezdesign on the same level as
1 2 3 4
Finally, configure designs for empty SiteAccess groups:
1 2 3 4 5 6
Add templates configuration¶
Add thumbnails and names for your templates in
It will connect SiteAccesses with the templates.
1 2 3 4 5 6 7 8 9 10
You can check the results of your work in the Back Office by going to the Site tab. There, you should be able to add a new site and choose a design for it.
To be able to see your site online you need to define a domain for it.
Define domain for production environment
These steps are for
dev environment only.
If you want to define domains in production environment, you will need to configure Apache or Nginx by yourself.
.env file change line 2 to:
Take a look into the
Here you will define your domains.
To add a new domain you must add it in
command: and under frontend and backend aliases as shown in the example below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Next, you must define the domains in
Your sites should be now visible under:
1 2 3 4
Define site directory¶
You can adjust the place where the directory of the new site will be created.
By default the Location for the site directories is defined in bundle configuration
To change it to e.g. eZ Platform, go to
config/packages/ezplatform_site_factory.yaml, and add the following parameter:
Now, all new directories will be created under eZ Platform.
The Site Factory is set up, now you can provide sufficient permissions to the Users.
Set the below Policies to allow Users to:
site/view- enter the Site Factory interface
site/create- create sites
site/edit- edit sites
site/change_status- change status of the public accesses to
site/delete- delete sites
For full documentation on how Permissions work and how to set them up, see the Permissions section.
Disable Site Factory¶
Enabled Site Factory may cause following performance issues:
- Config Resolver will look for SiteAccesses in the database
- Site Factory matchers will be connected to the database in search for new SiteAccesses
You can disable Site Factory to boost Config Resolver performance. Keep in mind that with disabled Site Factory you will not be able to add new sites or use existing ones.
config/packages/ezplatform_site_factory.yaml change enabled to
config/packages/ezplatform.yaml comment the
ezplatform.siteaccess.match: '@EzSystems\EzPlatformSiteFactory\SiteAccessMatcher': ~ if it is uncommented.
3. Remove separate connection to database in
1 2 3 4 5 6
4. Remove separate cache pool in
1 2 3 4 5 6
The Site Factory should be disabled.