masilia / ibexa-sites
Sites created at run time: a registry of sites (hosts, languages, root, design) that Ibexa serves without a deploy
Requires
- php: >=8.3
- doctrine/doctrine-bundle: ^2.13
- doctrine/doctrine-migrations-bundle: ^3.4
- doctrine/orm: ^2.20 || ^3.0
- ibexa/admin-ui: ^5.0
- ibexa/core: ^5.0
- masilia/ibexa-admin-kit: ^0.1.1
- psr/cache: ^3.0
- psr/event-dispatcher: ^1.0
- psr/log: ^3.0
- symfony/config: ^7.4
- symfony/console: ^7.4
- symfony/dependency-injection: ^7.4
- symfony/event-dispatcher: ^7.4
- symfony/framework-bundle: ^7.4
- symfony/http-foundation: ^7.4
- symfony/http-kernel: ^7.4
- symfony/routing: ^7.4
- symfony/security-core: ^7.4
- symfony/security-csrf: ^7.4
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- symfony/cache: ^7.4
Suggests
- masilia/editorial-toolbox: Gives the in-context editing toolbox the admin siteaccess of each site
- masilia/ibexa-ai-craft: The assistant creates and changes sites (site.* capabilities)
- masilia/ibexa-blocks: Gives each site its layout (masilia_ibexa_blocks.layout_remote_id) from the registry
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-18 00:24:13 UTC
README
Create and change sites at run time: a registry of sites (hosts, languages, root, design) that Ibexa serves without a deploy.
masilia/ibexa-sites is part of a family of packages for Ibexa that work together or alone. See the other packages.
What it is
In Ibexa, a site is a siteaccess group written in YAML: adding a site means editing files and deploying. masilia/ibexa-sites keeps the sites in the database instead, in a registry, and makes Ibexa serve them at run time. An administrator creates a site in the admin, chooses where its content starts, and activates it: its hosts answer at once.
Features
- A registry of sites (
masilia_sitetable): each site has a name, a root location, a design, its front siteaccesses (host, optional path prefix such as/fr, languages in fallback order), its admin siteaccesses, an optional base group it takes its settings from, a directory for its files, the domain of its session cookie, the remote id of its layout, and a contact email and address. - Served at run time: a matcher answers by host and prefix, the siteaccess provider, the groups, the default siteaccess, the session and the per-siteaccess settings (languages, root, design, translations) are completed from the registry.
- Draft, active, disabled: a draft is never served. Activating a site serves its hosts and lets visitors in (the Anonymous role is updated); disabling it takes them out. A site that holds the default siteaccess cannot be disabled or deleted.
- Checked field by field: names, hosts, prefixes, languages, addresses taken by another site or by your YAML, the cookie domain that must cover every host of the site. A cookie domain that also reaches another site is a warning, not a refusal.
- An admin page (
/sites), built with React and the Ibexa Universal Discovery Widget: a filterable list, a side panel to edit, live validation, confirmation before activating or deleting, and a card for the default siteaccess. - A JSON API under
/api/masilia/sites(admin siteaccesses only, CSRF-protected) and the policiesmasilia_site/viewandmasilia_site/manage, given by role. - Settings for the other packages: the registry answers
site_name,site_url,site_emailandsite_addressin themasilia_ibexa_sitesnamespace of the configuration resolver, the layout of the site formasilia/ibexa-blocks, and the admin siteaccess of the site formasilia/editorial-toolbox. - Contracts (
Masilia\Contracts\IbexaSites):SiteRegistry,Site,SiteAccessDefinition,SiteStatus,Problem,SiteOptions,SiteSettingsand theSiteChangedevent, for packages that work with sites.
Requirements
- PHP 8.3 or later
- Ibexa 5.0 (Symfony 7.4)
- Node.js 24 and Yarn, to build the admin assets with the Ibexa Encore setup of your project
Installed with it by Composer:
masilia/ibexa-admin-kitfor the React components of the admin page
Works better with (optional):
masilia/ibexa-blocksuses the layout of each sitemasilia/editorial-toolboxfinds the admin siteaccess of each sitemasilia/ibexa-ai-craftthe assistant creates and changes sites
Installation
composer require masilia/ibexa-sites
-
Enable the bundle in
config/bundles.php(andMasiliaIbexaAdminKitBundle, which it uses for its admin page):Masilia\Bundle\IbexaAdminKit\MasiliaIbexaAdminKitBundle::class => ['all' => true], Masilia\Bundle\IbexaSites\MasiliaIbexaSitesBundle::class => ['all' => true],
-
Import the routes (
config/routes/masilia_ibexa_sites.yaml):masilia_ibexa_sites: resource: '@MasiliaIbexaSitesBundle/Resources/config/routes.yaml'
-
Create the tables and build the admin assets:
php bin/console doctrine:migrations:migrate php bin/console cache:clear yarn ibexa-generate-tsconfig yarn encore dev # or: yarn encore production -
Give a role the policies
masilia_site / view(see the sites) andmasilia_site / manage(create, change, activate, delete). Manage also decides who may let visitors into a siteaccess, so give it with the care of a role change. The entry Sites appears in the Admin menu.
What your project keeps in YAML
Ibexa needs at least one siteaccess and a default one before the registry is read. Keep a minimal technical siteaccess, and declare the two groups the registry fills:
# config/packages/ibexa.yaml ibexa: siteaccess: list: [technical] groups: technical_group: [technical] default_siteaccess: technical system: technical: languages: [eng-GB]
The siteaccesses of the registry join the groups front_group (declare it, even empty, wherever your configuration reads it) and admin_group, plus the group of their site and its base group.
Usage
Open Sites in the admin: New site, give a name, the languages and the host, choose the root location in the content browser, pick a design, save, then Activate. The hosts must also answer at the server (DNS, web server, certificate, cache): nothing here changes that.
From the console:
# Import the site groups of your YAML as drafts (nothing is overwritten) php bin/console masilia:sites:import-static [--dry-run] # Activate or disable sites, by group name or all of them php bin/console masilia:sites:set-status active mysite_group php bin/console masilia:sites:set-status disabled --all
Moving a site from YAML to the registry — import it as a draft, remove its siteaccesses from the YAML (the registry refuses addresses your YAML still declares), clear the caches, then activate it.
In code, read and write sites through Masilia\Contracts\IbexaSites\SiteRegistry; listen to SiteChanged to react to a change.
Tests
composer install vendor/bin/phpunit vendor/bin/phpstan analyse --memory-limit=2G --no-progress
The tests of the admin scripts run with Node (see CONTRIBUTING.md).
The Masilia packages
| Package | What it does |
|---|---|
masilia/ibexa-admin-kit |
React components in the design of the Ibexa admin, for admin pages |
masilia/ibexa-sites |
A registry of sites that Ibexa serves without a deploy |
masilia/ibexa-ai |
The AI assistant for Ibexa: capabilities, providers, chat, approval flow |
masilia/ibexa-ai-craft |
The assistant builds sites and pages out of blocks |
masilia/ibexa-ai-editor |
AI suggestions and image generation in the content editing form |
masilia/ibexa-blocks |
Front-office rendering of pages made of blocks, with themes |
masilia/editorial-toolbox |
In-context editing toolbar for the front office |
What requires what (Composer installs it for you):
ibexa-sitesrequiresibexa-admin-kitibexa-airequiresibexa-admin-kitibexa-ai-editorrequiresibexa-aiibexa-ai-craftrequiresibexa-ai,ibexa-blocksandibexa-sitesibexa-blocksandeditorial-toolboxrequire none of the others; they are happy to findibexa-sites(and each other) when installed.
Compatibility
| Package version | PHP | Ibexa |
|---|---|---|
latest |
8.3+ | 5.0 |
Download
- Composer (recommended):
composer require masilia/ibexa-sites— ibexa-sites on Packagist - Archive of a release: GitHub releases (each release lists what changed)
- Source:
git clone https://github.com/MasiliaLabs/ibexa-sites.git - What changed between versions: CHANGELOG.md
Support, contributing and security
- Questions and bug reports: GitHub issues
- Pull requests are welcome, see CONTRIBUTING.md
- Security problems: please follow SECURITY.md and do not open a public issue
License
Released under the MIT license. Copyright © 2026 MasiliaLabs.
Ibexa itself is distributed under its own licenses (Ibexa OSS: GPL-2.0), which apply to the project that uses this package. This package is an independent project, not affiliated with or endorsed by Ibexa AS; "Ibexa" is a trademark of its owner.