Docs

WordPress Integration

Agenties can operate WordPress sites through the ForgePress plugin. The plugin is the secure tunnel and executor; Agenties is the brain, workflow controller, guardrail layer, and skill-driven operator.

Architecture

Model
Agenties local app
  → MCP tools (risk-tier checked, confirmation gated)
    → ForgePress plugin REST API (/wp-json/forgepress/v1/*)
      → WordPress site
LayerResponsibility
ForgePress pluginSecure site tunnel, X-ForgePress-Key authentication, REST endpoints, PHP executor when enabled.
AgentiesPlanning, workflow, risk-tier enforcement, write confirmation gates, audit trail, and MCP surface.
SkillsBuilder and plugin knowledge: Gutenberg, WooCommerce, ACF, SEO, cache plugins, page builders.
MCP toolsGuarded controls the orchestrator can call — every write requires tier + confirmation text.
Note:The API key is stored locally and sent as an X-ForgePress-Key header on every request. It is never stored in plain text — Agenties uses its internal secrets store.

Risk tiers

WordPress capabilities are gated by tier. Each tier is cumulative — a higher tier unlocks all lower-tier operations. Tiers are set in Settings → WordPress and apply per project.

TierTypical operations
read_onlyStatus, site info, posts/pages, plugins/themes, options (default on connect).
content_writeCreate and update draft posts and pages (status changes are blocked at this tier).
admin_opsPlugin toggles, cache flush, WooCommerce option writes.
db_opsGuarded SQL queries. Requires confirmation text + backupConfirmation for destructive queries. Blocks wp_users.
php_execControlled PHP execution with explicit unlock consent. Dangerous patterns are scanned and blocked.
Tier order
read_only < content_write < admin_ops < db_ops < php_exec
Warning:Every write operation requires confirm: true and a specific confirmationText string (e.g. "CREATE DRAFT", "FLUSH CACHE"). This is enforced at runtime regardless of tier. DB DELETE/DROP/TRUNCATE also requires backupConfirmation: true.

MCP tools

ToolTier requiredPurpose
wordpress_statusread_onlyRead connection status, tier, and last capabilities scan.
wordpress_get_site_inforead_onlyRead WordPress/PHP/site metadata from the plugin.
wordpress_get_capabilitiesread_onlyDetect active stack and get recommended skills list.
wordpress_list_postsread_onlyList posts with pagination and search.
wordpress_list_pagesread_onlyList pages with pagination and search.
wordpress_list_pluginsread_onlyList installed plugins.
wordpress_list_themesread_onlyList installed themes.
wordpress_get_optionsread_onlyRead WordPress options table values.
wordpress_create_postcontent_writeCreate a draft post (status always forced to draft).
wordpress_update_postcontent_writeUpdate post content/title/excerpt (status changes blocked).
wordpress_create_pagecontent_writeCreate a draft page.
wordpress_update_pagecontent_writeUpdate page title or content.
wordpress_toggle_pluginadmin_opsActivate or deactivate a plugin by file path.
wordpress_flush_cacheadmin_opsFlush WP cache + WP Rocket / W3TC / LiteSpeed if present.
wordpress_set_woocommerce_optionadmin_opsWrite a WooCommerce option key.
wordpress_run_db_querydb_opsRun a guarded SQL query. Blocks wp_users writes.
wordpress_unlock_php_execphp_execUnlock PHP execution for the session (requires consent string).
wordpress_execute_phpphp_execExecute guarded PHP. Dangerous patterns are scanned.
wordpress_set_accessSet the Agenties-side risk tier for the project.
Tip:All write operations (content_write and above) are logged to .agenties/activity/wp-write-*.json. DB queries go to wp-db-*.json and PHP executions to wp-php-*.json for full audit trail.

Skills

Site-specific and builder knowledge lives in skills, not in code. After the capabilities scan, the orchestrator loads the right skill for the detected stack. Skills are auto-recommended from the detected builder and active plugin list.

SkillWhen to use
wordpress-coreGeneral WordPress read and admin operations playbook. Always load first.
gutenberg-builderReading and writing Gutenberg block content via the REST API.
woocommerce-coreStore audit, products, orders, and settings. Includes riskTier model for writes.
elementor-builderElementor page builder sites (auto-detected).
bricks-builderBricks page builder sites (auto-detected).
divi-builderDivi page builder sites (auto-detected).
acfAdvanced Custom Fields — read and write field groups (auto-detected).
rankmath-seo / yoast-seoSEO meta, sitemaps, and schema (auto-detected).
wp-rocket / litespeed-cacheCache management and performance plugins (auto-detected).

Recommended workflow

StepAction
1Connect the site URL and API key in Settings → WordPress.
2Agenties runs a capabilities scan automatically on connect.
3Start in read_only — the default on every new connection.
4Load the recommended skills for the detected stack.
5Escalate tier only when a specific write task requires it.
6Prefer draft post/page tools before DB or PHP.
7Use php_exec only as a last-resort controlled execution path.
Warning:Use db_ops and php_exec on disposable or staging sites first. They are powerful by design and should always be paired with backups, confirmation gates, and audit logs.