Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,155 of 9,155 pages
About the help in other languages
All help pages

Forking a site package

Start your own site package from a working one - which package to copy, how the source repositories are laid out, what to rename in package.xml and the installer files, and which names must be unique so an installation…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/site-packages/your-own/forking-a-site-package.md

On this page

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

  1. Choose what to start from
  2. The source repository layout
  3. Copy the repository
  4. Rename the package
  5. Rename the installer
  6. Decide what to keep as a requirement
  7. Checklist

Choose what to start from

Start fromWhenSource
sevenx_multisitea site with demo content, several siteaccesses and languages, layoutsse7enxweb/sevenx-ezpackage, packages/sevenx_multisite/
sevenx_multisite_cleanthe same structure without the demo articlessame repository
sevenx_site, sevenx_site_cleana simpler sitesame repository
cjw_multisitea fork that already replaced the demo content and the installer class: the best example of what a fork changesse7enxweb/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.sh

cjw_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_site

Keep 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>
FieldRuleWhy
<name>letters, digits, _ and - only, not starting with - (eZPackage::isValidName()); lower case letters, digits and _ are the conventionthe upload page and eZPackage::import() refuse other names
<name>unique: not the name of a 7x packageone 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 organizationthe import puts the package in var/storage/packages/<vendor>/, the vendor turned into a directory name (eZ systems became ez-systems)
<summary>one linethe setup wizard shows it under the thumbnail
<maintainers>, <changelog>your names and a role address of your owndo not keep the 7x maintainer e-mail; reviewers and users write to it
<packaging><host>your host or leave it as the kernel writes itinformational

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).

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x