Install the Manager
Install the WordPress plugin, activate it to create its tables, and point it at your CLI server.
Install
Release zips are attached to GitHub Releases under the asset name captaincore-manager.zip, built by bin/build-zip.sh. Install the latest one with WP-CLI:
wp plugin install https://github.com/CaptainCore/captaincore-manager/releases/latest/download/captaincore-manager.zip --activate
To pin a version, use the tagged asset path instead. manifest.json in the repository always names the current one, for example:
https://github.com/CaptainCore/captaincore-manager/releases/download/v1.1.0/captaincore-manager.zip
You can also download the zip and upload it through the WordPress Plugins screen.
What activation does
Activation runs Captaincore_Activator::activate(), which:
- Calls
CaptainCore\DB::upgrade(). This is thedbDeltamigration that creates everywp_captaincore_*table:sites,environments,accounts,providers,domains, theaccount_site/account_domain/account_userjunctions,captures,snapshots,processes,process_logs,recipes,scripts,keys,invites,job_tokens,activity_logs,site_audits,session_snapshotsand the rest. - Adds the rewrite rules for the dashboard through
CaptainCore\Routerand flushes them. - Redirects you to
/accountunless you are running under WP-CLI.
The schema is also checked on every init and admin_init by captaincore_maybe_upgrade_db(). It compares the captaincore_db_version site option against CaptainCore\DB::REQUIRED_VERSION and runs the migration under a lock (captaincore_db_upgrade_lock) that is reclaimed after 15 minutes. So an upgrade that lands with the plugin already active migrates itself on the next page load.
Pretty permalinks
Turn on pretty permalinks before connecting anything (Settings, Permalinks, any structure other than Plain, or wp rewrite structure '/%postname%/'). A fresh WordPress install defaults to Plain, which serves the homepage for every /wp-json/ URL. The CLI’s connect command falls back to the ?rest_route= form and still works, but the Manager’s own dashboard routes under /account need rewrite rules.
Point the Manager at the CLI
The Manager dispatches jobs to captaincore server at a base URL it stores in its global configurations. You do not set it here. On the CLI server, run:
captaincore connect --server-url=https://captaincore-api.example.com
That registers the address with the Manager over the same administrator-authenticated request that hands the CLI its token. The value then appears under Settings, Branding, as “CLI server”, where it can be edited. Every dispatch appends a path to it (/run, /run/background, /run/stream, /tasks, /task/{id}, /progress), and the WebSocket address is derived from it by swapping the scheme for wss://.
A wp-config.php constant still works and overrides the saved value when you would rather pin it in code:
define( 'CAPTAINCORE_CLI_ADDRESS', 'https://captaincore-api.example.com' );
define( 'CAPTAINCORE_CLI_SOCKET_ADDRESS', 'captaincore-api.example.com' ); // optional
The Settings field notes when a constant is in charge. Only an administrator-authenticated connect can change the address; a token-authenticated captaincore connect --sync cannot.
The CLI token
The shared secret between the two halves comes from captaincore_get_cli_token():
- If
CAPTAINCORE_CLI_TOKENis defined inwp-config.php, that value is used. - Otherwise the token is read from the
captaincore_cli_tokenoption, and generated withwp_generate_password( 64, false )on first use.
You do not have to create or copy it by hand. captaincore connect fetches it over an authenticated request and writes it to both config.json and data/config.json on the CLI server. See Install the CLI.
The self-updater
includes/class-captaincore-manager-updater.php feeds WordPress its own update information, so updates arrive through the normal Plugins screen and wp plugin update.
- The manifest is fetched from the pinned URL
https://raw.githubusercontent.com/CaptainCore/captaincore-manager/master/manifest.jsonand cached in thecaptaincore_manager_updatertransient for one hour. If GitHub is unreachable, the bundledmanifest.jsonis used and the failure is cached for five minutes. - An update is only offered when the manifest’s
download_urlishttps, ongithub.com,objects.githubusercontent.comorcodeload.github.com, under the path prefix/CaptainCore/captaincore-manager/, and the manifest publishes a non-emptysha256. - Before install,
verify_package()downloads the zip and compareshash_file( 'sha256', $file )against the published hash withhash_equals(). A mismatch, or a manifest with no hash, rejects the update rather than installing it.
To force a re-check:
wp transient delete captaincore_manager_updater
Where settings live
Operational settings are edited in the Settings section of the /account dashboard, not on a wp-admin options page. templates/core/settings.js loads six sources:
| Screen area | Route |
|---|---|
| Branding (name, colors, logo width) | GET /configurations/, saved with PUT /configurations/global |
| Providers | GET /providers, verified with GET /providers/{id}/verify |
| Site defaults (email, timezone, recipes, users) | GET /defaults/, saved with PUT /defaults/global |
| SSH keys | GET /keys/, deleted with DELETE /keys/{id} |
| Cookbook recipes | GET /recipes/ |
| Handbook processes | GET /processes/ |
Providers, defaults, keys and processes are operator-only; customers see the Cookbook tab.