Packages: Distribution Made Easy

Packages are mini-installer plugins that bundle Troy Client with your plugins. When someone installs a Package, they get everything in one step — no manual Troy Client installation required.

Packages also double as Composer metapackages. Bedrock and other Composer-managed WordPress sites can pull in your entire bundle with a single composer require.

Plugins vs Packages:

Plugins are for updates. Packages are for distribution.

  • Use Plugins to serve updates to users who already have Troy Client.
  • Use Packages to distribute your plugins to new users.

Packages always fetch the latest version of bundled plugins at install time. You don't need to rebuild Packages when you release plugin updates.

Why Use Packages?

Without a Package

  • Your users must find and install Troy Client separately.
  • Without it, users can't fetch updates from your repository.
  • Large plugin ZIPs stall on slow connections and trigger lengthy OS anti-malware scans.

With a Package

  • Troy Client is bundled and connects your users to your repository automatically.
  • Updates flow automatically after a single install.
  • Packages are under 10 KB — uploads pass even on spotty connections.

Creating a Package

1

Create a New Package Post

In your WordPress admin:

  1. Go to Repo Packages → Add New Package.
  2. A new Package post opens in the editor.
2

Set the Title and Slug

Enter a title for your Package (e.g., "My Plugin Suite Installer"). The title determines the installed plugin name and the namespace the Package installer uses. It also predefines the slug, but you can override that in the Package settings.

Set the slug (e.g., example-package). The slug appears in the download URL and the Composer package name.

3

Add Plugins

In the Plugins meta box:

  1. Click Add Plugin.
  2. Select plugins from your repository.
  3. Configure each plugin:
    • Activate — Activate the plugin after installation. On by default.
    • Network — Network-activate the plugin on multisite. Off by default — the package-level Network Activation setting can override this.
    • Overwrite — Replace the plugin if it's already installed on the site. On by default — turn this off to skip plugins that are already present.
    • Overwrite Troy — Replace the plugin even if another Troy Server already manages it. Off by default — enable this to take over management from another repository.
4

Configure Settings

In the Settings meta box:

SettingDescription
Install TimeoutMaximum seconds the installer can run before timing out. Default: 30.
Deactivate on CompletionDeactivate the Package plugin after a successful install. On by default — disable only for testing.
Delete on CompletionDelete the Package plugin after a successful install.
Network ActivationBlock prevents network activation. Activate All network-activates every bundled plugin. Require network-activates all bundled plugins and adds a Network: true header so WordPress enforces network-only activation. Default: Block.
Notice SeverityHow much feedback the installer shows: Detailed (every step), Verbose (important messages), or Silent (minimal output).
Requires WPMinimum WordPress version the Package requires. Default: 6.7.
Requires PHPMinimum PHP version the Package requires. Default: 7.4.

Don't Delete on Completion:

Recommended settings: Deactivate on completion, but don't delete. Your users can delete manually if they want, and WordPress Site Health will remind them. This keeps things tidy while leaving control in their hands.

5

Publish

Click Publish. Your Package is now available at:

https://repo.example.org/package/get/zip/example-package
𒄈

How Packages Work

When someone activates your Package on their WordPress site:

  1. Troy Client Installation

    • The installer checks whether Troy Client is already present.
    • If not, it downloads and installs Troy Client from the official repository.
    • Troy Client is always installed first — it's a forced dependency.
  2. Plugin Installation

    • The installer fetches the latest version of each bundled plugin from your repository.
    • Each plugin is installed and optionally activated.
    • Existing plugins are overwritten or skipped based on your settings.
  3. Cleanup

    • The Package deactivates itself (if configured).
    • The user can delete the Package afterward.

Packages include the Troy: disable-all-communications header. Once Troy Client is installed, this header hides the installer plugin from all external API requests — WordPress.org and other Troy Servers won't see it.

Why Troy Client Is Always Bundled:

Troy Client is a forced dependency. Without it, WordPress fetches plugin information from wordpress.org instead of your repository — opening the door to supply chain attacks or broken updates.


Package vs Plugin Lifecycle

AspectPluginPackage
PurposeServe updates.Distribute your plugin bundle.
Troy ClientYou install it yourself.Bundled automatically.
VersioningEach version is stored.Always fetches latest at install time.
RebuildingUpload new ZIPs.Only when the bundle contents change.
User actionInstall, receive updates.Install once, then delete the Package.

Advanced Settings

Per-Plugin Configuration Options

For each plugin in a Package:

OptionDefaultDescription
ActivateOnActivate the plugin after installation.
NetworkOffNetwork-activate the plugin on WordPress multisite.
OverwriteOnReplace the plugin if it's already installed on the site.
Overwrite TroyOffReplace the plugin even if another Troy Server already manages it.

Overwrite Behavior:

With Overwrite off, an existing plugin (even if inactive) blocks installation. The default is on — leave it that way unless you have a reason not to.

Notice Severity Levels

Control how much feedback your users see during installation:

LevelBehavior
DetailedLogs every installation step and result. Best for debugging.
VerboseLogs important messages only. Recommended for most Packages.
SilentMinimal output — your users won't see what was installed.

Distributing Packages

Install method:

Share instructions like these on your website — adapt the plugin names and download link to match your Package:

Install via WordPress

1. Download the installer ZIP file from here.
2. Log in to your WordPress dashboard.
3. Go to Plugins → Add New.
4. Click "Upload Plugin" at the top.
5. Upload the ZIP file you downloaded.
6. Activate the plugin.
7. The installer sets up [my plugins] and Troy Client
   (the update delivery plugin). You can delete the installer
   afterward.

The download URL for your Package looks like:

https://repo.example.org/package/get/zip/example-package

Updating Packages

Packages fetch the latest version of each bundled plugin at install time — you don't need to rebuild them for every plugin update.

Rebuild your Package when:

  • Adding or removing plugins from the bundle.
  • Changing plugin configuration (activate, overwrite, etc.).
  • Updating Package metadata (name, description, author).
  • A new Troy Server version introduces installer improvements.

Composer users pick up the changes automatically — the metapackage always reflects the current bundle contents.

To rebuild: Open the Package in the editor and click Update. The ZIP is regenerated automatically. Bumping the version number is optional — it's purely decorative since the Package is a throwaway installer, not a versioned deliverable.


Next Steps