canonry

WordPress Setup

Canonry integrates with WordPress through the core REST API using Application Passwords. The integration is intentionally split into:

Content operations are CLI/API-first. The dashboard can connect a WordPress server-log traffic source under /traffic, but page/content automation remains on the CLI and API.


Prerequisites


What Canonry Can Automate

canonry wordpress pages <project>
canonry wordpress page <project> <slug>
canonry wordpress create-page <project> --title ... --slug ... --content-file ./page.html
canonry wordpress update-page <project> <slug> --title ... --content-file ./page.html
canonry wordpress set-meta <project> <slug> --title ... --description ...
canonry wordpress audit <project>
canonry wordpress diff <project> <slug>

SEO meta support is capability-based

canonry wordpress set-meta only writes SEO fields when WordPress exposes them through REST. That usually means:

If the site does not expose writable SEO fields, canonry returns an actionable error instead of attempting undocumented plugin hacks.


What Stays Manual

These commands generate content and instructions, but they do not apply the change remotely:

canonry wordpress set-schema <project> <slug> --json '{"@type":"FAQPage"}'
canonry wordpress set-llms-txt <project> --content "..."
canonry wordpress staging push <project>

Use them when you want canonry to generate the payload while leaving the final server or wp-admin action to an operator.


Connect a Project

Set WORDPRESS_APP_PASSWORD in your shell before you run this example. The command requires --app-password.

canonry wordpress connect mysite \
  --url https://example.com \
  --user admin \
  --app-password "$WORDPRESS_APP_PASSWORD" \
  --staging-url https://staging.example.com \
  --default-env staging

Connection data is stored in ~/.canonry/config.yaml under the WordPress section, not in the project database tables. The Application Password is stored there in plain text with the config file’s existing 0600 permissions model, so do not commit or share that file.

Environment model

Examples:

canonry wordpress pages mysite --staging
canonry wordpress page mysite about --live
canonry wordpress audit mysite --staging

Common Workflows

Review and edit content

canonry wordpress pages mysite --staging
canonry wordpress page mysite pricing --staging
canonry wordpress update-page mysite pricing --title "New title" --content-file ./pricing.html --staging

Audit a site before publishing

canonry wordpress audit mysite --staging
canonry wordpress diff mysite pricing

audit prioritizes:

Generate manual handoffs

canonry wordpress set-schema mysite pricing --type FAQPage --json '{"@type":"FAQPage"}'
canonry wordpress set-llms-txt mysite --content "User-agent: *"
canonry wordpress staging push mysite

Each command returns:


Troubleshooting

WordPress credentials are invalid or lack permission

The username or Application Password is wrong, or the account lacks page-edit permissions. Create a fresh Application Password in WordPress and reconnect.

No staging URL configured

Reconnect the project with --staging-url, or use --live on the command.

Multiple pages matched slug

WordPress returned duplicate slug matches. Canonry lists the candidate page IDs and titles; resolve the duplicate in WordPress, then rerun the command.

This WordPress site does not expose writable SEO meta fields through REST

Canonry can read the rendered SEO state, but it cannot safely write plugin meta on that site. Update the SEO fields in WordPress directly or expose the needed meta keys via REST.

llms.txt or schema was not applied

That is expected. set-llms-txt and set-schema are manual-assist commands only. Canonry returns the content to paste plus the next-step checklist.