-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Summary
Extend canonry wordpress from audit-only to a full AEO operations platform. Today canonry monitors and audits. This makes it deploy, manage, and report too.
Motivation
The current WordPress workflow requires manual REST API calls for page creation, schema deployment, meta management, and plugin installation. Everything works, but it is ad-hoc scripts rather than structured CLI commands. Packaging these into canonry makes the workflow repeatable across clients and projects.
Proposed Commands
Page Management
canonry wordpress create-page <project> --title "..." --slug "..." --content ./page.html --status draft
canonry wordpress update-page <project> <page-id> --content ./page.html
canonry wordpress list-pages <project>
Meta Management
canonry wordpress set-meta <project> <page-id> --title "..." --description "..."
canonry wordpress set-meta <project> --all --from ./meta.json
Schema Management
canonry wordpress schema deploy <project> # generates and injects JSON-LD into pages
canonry wordpress schema status <project> # shows current schema state per page
Schema should be injected using native WordPress mechanisms (post meta, theme hooks, or wp_head output) without requiring any third-party plugins.
Onboarding (compound command)
canonry wordpress onboard <project> --url https://example.com --user <user>
Single command that: connects, audits, deploys schema via native WordPress APIs, sets meta titles/descriptions based on audit, submits to GSC + Bing.
Reporting
canonry report <project> --type initial-optimization --output ./report.pdf
canonry report <project> --type monthly --output ./report.pdf
Branded PDF generation using stored report templates. Pull data from canonry DB (audit results, sweep history, coverage stats).
Design Principles
- No custom plugin dependencies. All operations use the WordPress REST API and native WordPress functionality. No requirement to install Code Snippets, WPCode, or any other plugin on the target site.
- WP admin credentials only. No SSH, FTP, or hosting panel access required.
- Plugin-agnostic. Should work regardless of which SEO plugin (Yoast, Rank Math, AIOSEO, or none) or page builder (Elementor, Gutenberg, Divi) the site uses.
- Detect and adapt. Canonry should detect what is installed on the target site and adapt its approach accordingly (e.g., use Yoast meta fields if Yoast is present, use native post meta if not).
Schema Injection Approaches (no plugins required)
- Post meta storage - Store JSON-LD in a custom post meta field (e.g.,
_canonry_schema), register it withshow_in_rest, then inject via a mu-plugin or theme hook - mu-plugin - Drop a single PHP file into
wp-content/mu-plugins/via the REST API (if writable) that reads schema from post meta and outputs it inwp_head - Direct HTML in page content - Append
<script type="application/ld+json">blocks to the page content field itself. Works everywhere, no plugins, no file access needed. - Hybrid - Use approach 3 as the universal fallback, with smarter injection when the environment allows it
SEO Plugin Detection
Canonry should detect and handle:
- Yoast SEO - meta stored in
_yoast_wpseo_title,_yoast_wpseo_metadesc(needshow_in_restregistration) - Rank Math - meta stored in
rank_math_title,rank_math_description(usually REST-exposed) - AIOSEO - meta stored in
_aioseo_title,_aioseo_description - No SEO plugin - fall back to native
<title>tag manipulation and<meta>injection in content
Implementation Phases
Phase 1: Page + Meta management (create-page, update-page, list-pages, set-meta with SEO plugin detection)
Phase 2: Schema management (schema deploy, schema status using native WordPress approaches)
Phase 3: Onboarding (onboard compound command)
Phase 4: Reporting (report with PDF generation)
Architecture Notes
- All WordPress operations use the REST API with Application Passwords (already stored per-project via
canonry wordpress connect) - Schema templates stored in
packages/canonry/assets/schemas/parameterized per project (business name, phone, address, services, locations) - Report templates stored in
packages/canonry/assets/reports/ - SEO plugin detection runs once on connect/audit and is cached in project config