- Home
- Manage the site
- Run it in production
- Multisite installations
Multisite installations
DXPR Builder runs in a Drupal multisite installation the same way it runs on separate servers: one copy of the module code, one database per site, and one product key that all sites share. This page covers what is shared, what is per site, and how to set it up.
Licensing across sites
One product key serves all your sites. Licensing is per editor, not per site, and the count is kept by the DXPR licence server:
- Each site sends its host name and its editors (the accounts with
the
edit with dxpr builderpermission that are not excluded, plus user 1) to the licence server (src/Service/DxprBuilderLicenseService.php). Accounts without a valid email address are not sent. - The server keeps one record per email address with the list of domains that address has edited on. A person who edits on three sites with the same email address counts once.
- Each site fetches the shared editor list from the server and reports the total to the status report and the User Licenses page. The list is cached for 24 hours.
Read Multi-site licensing for how editors are counted and released.
What is shared and what is per site
Shared through the code base:
- The module and its submodules in
modules/contrib/dxpr_builder. - The editor JavaScript. With Asset source set to Cloud, the default, every site loads the same release from the DXPR CDN. When the module directory holds a local build, every site loads the files from there instead.
- Icon sets and utility classes declared by modules and themes
(
*.dxpr_icon_sets.yml,dxpr_builder_classesin a theme's.info.yml). A theme's classes appear only on sites where that theme is enabled.
Per site, because it lives in that site's database and configuration:
dxpr_builder.settings: the product key or the Key entity that holds it, Custom styles, Sideload Bootstrap files, Browser type for media, the text filter and editor asset settings.- The Key entity itself (
key.key.*), when the product key is stored with the Key module. - AI settings (DXPR Studio > DXPR Builder > AI), including which models are enabled.
- Builder profiles (
dxpr_builder.dxpr_builder_profile.*), page templates (dxpr_builder.page_template.*) and user templates (dxpr_builder.user_template.*). - Uploaded images in each site's files directory
(
dxpr_builder_images,dxpr_builder_videos,dxpr_builder_files).
The Bootstrap setting has two values, None (theme provides Bootstrap) and Bootstrap 5. Choose per site according to the theme that site uses.
Setting up a new site in the multisite
- Create the site's
sites/<name>/settings.phpand database as for any Drupal multisite site. - Enable the module on that site:
bash
drush --uri=https://<site-host> en dxpr_builder -y
- Go to DXPR Studio > DXPR Builder > General Settings
(
/admin/dxpr_studio/dxpr_builder/settings) on that site. In the License section, paste the same product key you use on the other sites, or select a Key on this site that holds it. - Set Sideload Bootstrap files to match the site's theme.
- Create the site's builder profiles and, if required, import templates as described below.
Sharing templates between sites
Page templates and user templates are configuration entities, so you can move them with configuration export and import:
- Export the source site's configuration:
bash
drush --uri=https://<source-host> config:export
- Copy the
dxpr_builder.page_template.*.ymlanddxpr_builder.user_template.*.ymlfiles into the target site's configuration sync directory. - Import them on the target site:
bash
drush --uri=https://<target-host> config:import --partial
User templates carry a uid; the exported file references the
owner's user ID on the source site, so check the owner after the
import.
What's next?
- Multi-site licensing for editor counting and releasing licences.
- Importing and exporting templates for moving individual templates through the admin interface.