Site Initializer
Bundle a whole site (content, structure, roles) and provision on deploy.
# description
Packages a complete Liferay site — pages, structures, roles, content, settings, style-book, sample data — into a single extension. Deploying creates the site fully populated, in seconds, without any manual clicks. Site Initializer is how Liferay ships the demo sites you see in Liferay Learn tutorials, and it's the same mechanism used for repeatable multi-tenant provisioning. Because everything is checked into source, staging and production get identical starter sites; a bad edit can be rolled back by re-deploying an earlier version. The `overwrite: true` flag lets you re-provision an existing site on redeploy — useful in dev, dangerous in prod.
Bulk data import and full site provisioning on deploy.
# when to use
- →You're shipping a starter site (marketing template, product-specific tenant).
- →You want repeatable, checked-in site provisioning across environments.
# how to use
- 01Assemble your site export under the extension folder (structures, layouts, roles, content).
- 02Ship a paired
oAuthApplicationHeadlessServer. - 03Set the site's name + external reference code and deploy.
# required fields
| field | type | description |
|---|---|---|
siteNamerequired | string | Site name on deploy. |
siteExternalReferenceCoderequired | string | External reference code of the site. |
oAuthApplicationHeadlessServerrequired | string | Ref code of the paired oAuthApplicationHeadlessServer. |
# optional fields
| field | type | description |
|---|---|---|
name | string | Display name. |
overwrite | boolean | Overwrite an existing site on redeploy. |
builtInTemplateKey | string | Built-in site template key. |
builtInTemplateType | string | Built-in site template type. |
membershipType | string | Site membership: open, restricted, or private. |
parentSiteKey | string | Parent site key for hierarchical sites. |
siteName_i18n | map(locale->string) | Localized site name by locale. |
# example
starter-site:
type: siteInitializer
siteName: Starter
siteExternalReferenceCode: STARTER_SITE
oAuthApplicationHeadlessServer: my-oauth-headless
overwrite: true# related types
Usually shipped alongside Site Initializer: