- Docs
- Deployment
- MU-Plugin Daemon
Troy Client Daemon
Troy Client Daemon is a must-use (MU) plugin for enterprise environments. It guarantees that Troy Client stays active and blocks WordPress.org requests until Troy Client is ready.
Grab troy-client-daemon.php from GitHub and drop it in mu-plugins/.
For Site Managers Only:
Deploy only if you manage the site. This is not for third-party plugins to bundle.
What It Does
- Auto-installs Troy Client if missing.
- Auto-activates Troy Client if inactive.
- Blocks WordPress.org API requests while Troy Client is inactive.
- Prevents deactivation through the admin UI.
When to Use It
| Environment | Reason |
|---|---|
| Managed Hosting | Ensure that all sites have Troy Client active. |
| Enterprise | Enforce plugin update policies. |
| Agencies | Prevent clients from breaking the update flow. |
Installation
Place troy-client-daemon.php directly in /wp-content/mu-plugins/:
wp-content/
βββ mu-plugins/
βββ troy-client-daemon.php β here, not in a subfolder
No activation required. MU plugins load automatically.
How It Works
The daemon hooks into muplugins_loadedβWordPress fires this before any regular plugin loads. From there, it checks whether Troy Client is active and acts accordingly:
The blocking of the WordPress.org API lasts only for the page load that triggers installation. Once Troy Client is active, it handles API filtering directly.
Installation and activation are separate steps. If WordPress is still setting up when the daemon runs, it installs the plugin but skips activation until the next request. A 15-second install lock prevents concurrent requests from triggering duplicate installs. If the process crashes, the lock expires automatically.
Requirements
| Requirement | Minimum |
|---|---|
| WordPress | 6.7+ |
| PHP | 7.4+ |
