- Docs
- Deployment
- Installer Plugin
Troy Installer
Troy Installer is a tiny plugin (~9kB) that installs Troy Client and any other plugins you configure. It's what powers Troy Packages.
Consider Troy Packages:
You probably don't need to edit an Installer directly. If you create a Package on your Troy Server, it generates an Installer automatically. Read on if you need advanced customization.
Why Use an Installer?
When a user downloads your plugin directly (ZIP file), they might not have Troy Client — without it, they'll never receive updates.
An Installer solves the bootstrapping problem:
- A user downloads the Installer (~9kB).
- They upload and activate it in WordPress.
- The server fetches Troy Client and your plugin(s) from your repository.
- The Installer activates everything.
- The Installer optionally deactivates and deletes itself.
Users only transfer a ~9kB file — it's quick to download and takes just a few seconds for local antivirus scans. The server handles the multi-megabyte downloads over its own connection.
Getting Troy Installer
The easiest way is to create a Package on your Troy Server — it generates a ready-to-distribute Installer with a UI and Composer support.
To build one manually, grab troy-installer.php from GitHub. It's a single PHP file — customize it, place it in its own folder, and ZIP the folder to create a distributable WordPress plugin.
Customizing the Installer
Open troy-installer.php and edit the section between Start editing here and Stop editing here. Three constants control behavior:
The display name shown in admin notices during installation. Set the value to match your brand or package name.
const PLUGIN_NAME = 'My Plugin Installer';
