Forking a site package
This page is for developers who want a site package of their own and would rather start from one that installs
than from an empty package.xml. It shows where the 7x packages come from, how to copy one, and what has to change so
your copy is a package of its own.
7x and the Exponential Foundation strongly encourage you to submit the result by pull request to se7enxweb/exponential.packages.exponential.earth, so it reaches every installation through the setup wizard, the kickstarter and ezupdate: see Contribute your site package.
Contents
- Choose what to start from
- The source repository layout
- Copy the repository
- Rename the package
- Rename the installer
- Decide what to keep as a requirement
- Checklist
Choose what to start from
| Start from | When | Source |
|---|---|---|
sevenx_multisite | a site with demo content, several siteaccesses and languages, layouts | se7enxweb/sevenx-ezpackage, packages/sevenx_multisite/ |
sevenx_multisite_clean | the same structure without the demo articles | same repository |
sevenx_site, sevenx_site_clean | a simpler site | same repository |
cjw_multisite | a fork that already replaced the demo content and the installer class: the best example of what a fork changes | se7enxweb/cjw_multisite-ezpackage |
What each one installs is described in sevenx_multisite and cjw_multisite.
The source repository layout
Both repositories keep one folder per package below packages/; the folder name is the package name and the folder
holds what the .ezpkg archive will hold:
packages/
├── build.sh (sevenx-ezpackage) packs every folder into <folder>.ezpkg
├── sevenx_multisite/
│ ├── package.xml the definition
│ ├── documents/LICENCE
│ ├── files/default/thumbnail/ the picture the setup wizard shows
│ ├── files/default/image/
│ └── settings/ the installer files named in <settings>
├── sevenx_classes/
│ ├── package.xml
│ └── ezcontentclass/class-*.xml
└── sevenx_multisite_democontent/
├── package.xml
├── ezcontentclass/ ezcontentobject/ simplefiles/
└── documents/LICENCE
bin/pack.sh, bin/repack_extension.sh, ant/createzpkg.shcjw_multisite-ezpackage has the same bin/ and ant/ scripts and, since 2026-10-19, the same packages/build.sh; see
Rebuilding with build.sh for both ways of packing.
Copy the repository
# on GitHub: Fork, or create an empty repository <your-org>/<yourname>-ezpackage
git clone https://github.com/<your-org>/<yourname>-ezpackage.git
cd <yourname>-ezpackage
# keep only the package folders you will change or ship
git mv packages/sevenx_multisite packages/acme_siteKeep the history: the 7x source repository goes back to 2006, and git log -- packages/sevenx_multisite explains
why most lines of the installer are there.
Rename the package
The package name is what the index lists, what kickstart.ini names in Site_package and the directory the package
is imported into. Change it in package.xml and in the folder name together:
<package version="6.0.15-0" development="false" is_active="true" install_type="import">
<name>acme_site</name>
<summary>Acme starter site</summary>
<description>What an editor gets after installing it.</description>
<vendor>acme</vendor>
<type value="site" />
...
</package>| Field | Rule | Why |
|---|---|---|
<name> | letters, digits, _ and - only, not starting with - (eZPackage::isValidName()); lower case letters, digits and _ are the convention | the upload page and eZPackage::import() refuse other names |
<name> | unique: not the name of a 7x package | one name means one package to an installation: the kickstarter uses a package that is already imported instead of downloading it, the setup wizard in the browser removes an imported site package of that name and downloads it again, a required package of that name is kept when its version is high enough (downloadAndImportPackage() and downloadDependantPackages() in kernel/setup/steps/ezstep_site_types.php), and an upload of an existing name is refused ("already exists") |
<vendor> | your organization | the import puts the package in var/storage/packages/<vendor>/, the vendor turned into a directory name (eZ systems became ez-systems) |
<summary> | one line | the setup wizard shows it under the thumbnail |
<maintainers>, <changelog> | your names and a role address of your own | do not keep the 7x maintainer e-mail; reviewers and users write to it |
<packaging><host> | your host or leave it as the kernel writes it | informational |
The full element list is on The package.xml reference; the required fields on Fields package.xml cannot do without.
Rename the installer
The <settings> element lists PHP files of settings/ that CreateSites includes with include_once:
<settings>
<settings-file filename='ini-site.php'/>
<settings-file filename='ini-admin.php'/>
<settings-file filename='ini-common.php'/>
<settings-file filename='acme-site-installer.php'/>
<settings-file filename='install-scripts.php'/>
<settings-file filename='roles.php'/>
<settings-file filename='preferences.php'/>
</settings>Rename the installer file and its class (sevenxMultiSiteInstaller became cjwMultiSiteInstaller in the CJW fork)
and update the small hook files that create it (install-scripts.php, ini-site.php, roles.php and the others each
call new sevenxMultiSiteInstaller( ... )). A class of your own name cannot collide with a 7x installer class, and the
debug output names your installer. Details: Changing the installer script.
Decide what to keep as a requirement
<dependencies><requires> names the packages installed before the site package:
<requires>
<require type="ezpackage" name="sevenx_classes" min-version="5.1" />
<require type="ezpackage" name="acme_site_democontent" min-version="1.0.0-1" />
</requires>You can keep a 7x package as it is, as cjw_multisite keeps sevenx_classes, and replace only what you change. A
required package is looked up in the same index.xml as the site package, so your index must list it too (its url
may point at the 7x server). See Declaring dependencies.
Checklist
- To do: Folder name,
<name>and every reference to the old name changed. - To do:
<vendor>,<summary>,<description>, maintainers and changelog are yours. - To do: Installer file and class renamed, hook files updated.
- To do:
<requires>lists exactly the packages you ship or reuse. - To do: Thumbnail replaced (
files/default/thumbnail/), license file reviewed. - To do: Version reset for your first release (Versioning your own packages).
Related pages
- Making your own site package
- Contribute your site package
- What a site installer package is
- What it is made of: sevenx_multisite
- sevenx and CJW compared
- Creating the GitHub repository
- Site packages: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.