Skip to content

Installation

xNetVN Development edited this page Nov 12, 2026 · 2 revisions

Installation

xNetVN Agent Hub WP installs like any WordPress plugin. The only non-standard step is the MCP Adapter: install it when you want MCP, in either order.

Before you start

Confirm the runtime first — see Requirements. You need WordPress 6.9+, PHP 8.2+, an InnoDB database and HTTPS. The plugin version at the time of writing is 1.0.0 (xnetvn-agent-hub-wp.php, readme.txt).

Availability

The plugin is not yet listed in the WordPress.org plugin directory, so do not look for it under Plugins > Add New Plugin (readme.txt is written in the directory format for a future submission). Install it from a release ZIP or from a source checkout as described below.

Install from a ZIP package

  1. Build the release ZIP from a checkout: composer build writes dist/xnetvn-agent-hub-wp-1.0.0.zip (README.md).
  2. Go to Plugins > Add New Plugin > Upload Plugin, choose the ZIP and select Install Now.
  3. Activate the plugin (docs/en/INSTALL.md).

A release ZIP already contains the Composer autoloader. Do not upload the source checkout as-is.

Install from a source checkout

A fresh Git checkout has no vendor/ directory, so the plugin refuses to boot until dependencies exist and shows a "dependencies are missing" notice (src/Bootstrap/Loader.php, src/Bootstrap/Notice.php).

cd wp-content/plugins
git clone https://github.com/xnetvn-com/xnetvn-agent-hub-wp.git xnetvn-agent-hub-wp
cd xnetvn-agent-hub-wp
composer install --no-dev --optimize-autoloader
wp plugin activate xnetvn-agent-hub-wp

Use the WordPress admin Plugins screen instead of WP-CLI if you prefer (docs/en/INSTALL.md).

Activation order

Both orders work, and the plugin deliberately does not declare a hard Requires Plugins header (CHANGELOG.md).

  • Adapter first — the recommended order. MCP starts as soon as this plugin is active and the version check passes.
  • This plugin first — activation succeeds, the plugin registers an admin notice, and MCP stays disabled. Install and activate a supported adapter and the notice clears on the next admin page load (src/Mcp/ServerGateway.php).

If the adapter is present but outside >=0.7.0 <0.8.0, the notice names the installed version and MCP stays off. Update the adapter rather than working around the check (src/Bootstrap/Requirements.php).

What activation creates

On activation, and again on each load through a cheap schema check, the plugin creates its per-site tables and secrets (src/Persistence/MigrationProvider.php, src/Persistence/Schema.php):

  • {prefix}xnetvn_agent_hub_wp_keys — key identity, HMAC hash, expiry and scope.
  • {prefix}xnetvn_agent_hub_wp_audit — request audit rows.
  • xnetvn_agent_hub_wp_pepper — 32 random bytes, stored without autoload, used as the HMAC key (docs/en/ENVIRONMENT.md).

On Multisite, each site gets its own tables, settings and pepper when it activates the plugin or receives its first request (docs/en/INSTALL.md).

After activation, open Agent Hub > Overview and follow Quick-Start.

Upgrade

Replace the plugin files through the WordPress updater, or upload the new ZIP over the old one. There is no separate upgrade command.

The schema check runs on plugins_loaded at priority 1, so a newer plugin migrates its tables on the first request after the files change (src/Persistence/MigrationProvider.php). Upgrading does not delete keys, activity rows or settings; only uninstall does, and only when that setting is on.

Deactivating is also non-destructive: it clears the plugin's scheduled events on the current site — and on every site for a network-wide deactivation — and keeps keys, audit rows and settings (CHANGELOG.md).

Uninstall and your data

Delete plugin data when uninstalled is on by default (delete_data_on_uninstall, default true). With it on, deleting the plugin:

  • drops the keys and activity tables,
  • deletes the plugin's options, including the stored pepper,
  • removes the plugin's scheduled events,
  • removes per-user notification preferences (docs/user-guide.md).

With the setting off, that site's data is kept, but the plugin's scheduled events are still removed. On Multisite each site's setting is checked separately, and shared per-user notification preferences are kept while any site keeps its data (docs/user-guide.md).

Some data always remains: the capability-less banned role, the ban snapshot and the password-reset timestamp per user, and any content, media, comments or terms an agent created — those are ordinary WordPress data and are never deleted by uninstall (readme.txt, docs/user-guide.md).

Before uninstalling, decide deliberately:

  1. Export the keys and activity you must keep, or turn the setting off to preserve the site's plugin data.
  2. Remember that turning it off leaves the pepper in place, and that deleting the pepper invalidates every key (docs/en/guides/operation-guide.md).

Next step

Continue with Quick-Start to create your first key and connect a client.

Clone this wiki locally