These docs have been generated using AI. Expect inaccuracies until we remove this banner.

Troy Headers

Troy headers are metadata in your plugin's main file. They tell Troy Client where to find updates.

Troy Header

Points to your Troy Server:

/**
 * Plugin Name: My Plugin
 * Version: 1.0.0
 * Troy: repo.example.com
 */

Troy Client reads this and checks https://repo.example.com/ for updates.

URL Formats

All of these work:

You WriteTroy Uses
repo.example.comhttps://repo.example.com/
example.com/troyhttps://example.com/troy/
http://example.comhttps://example.com/

HTTPS is always enforced. Maximum 191 characters.

Special Value

Troy: disable-all-communications

Hides your plugin from all external API requests, including WordPress.org. Use this for private plugins you don't want exposed anywhere.

Troy Dependencies Header

Declares plugins your plugin requires:

/**
 * Troy: repo.example.com
 * Troy Dependencies: required-plugin, another-plugin
 */

Dependencies from different servers:

/**
 * Troy Dependencies: local-plugin, external-plugin <other-server.com>
 */

Maximum 5 dependencies. See Dependencies.

Troy Dependency Header

Singular form—identical behavior, just grammatically nicer for one dependency:

/**
 * Troy Dependency: required-plugin
 */

Both Troy Dependency: and Troy Dependencies: are accepted. Use whichever reads better.

How Troy Client Uses These

  1. Scans all installed plugins
  2. Reads the Troy header
  3. Groups plugins by server
  4. Checks each server for updates
  5. Omits Troy-enabled plugins from WordPress.org requests

That last point matters: WordPress.org won't see your Troy-enabled plugins. Your users' plugin lists stay private.