# WordPress SEO for AI agents

WordPress sites accumulate overlapping SEO plugins, duplicate `<h1>` tags inside page builders, redirect chains and conflicting JSON-LD graphs. Pair clickd with your theme repository, WP-CLI or the WordPress REST API so your agent fixes templates and metadata cleanly.

- Install skills: `npx skills add subinternal/clickd`
- Ask your agent: "Audit our WordPress site with clickd_brief, inspect duplicate H1s and conflicting plugin JSON-LD on our live pages, fix our theme templates, and rescan."
- MCP tools used: `clickd_brief`, `clickd_pages`, `clickd_structure`, `clickd_rescan`

## What breaks most often on WordPress

- **Conflicting plugin JSON-LD graphs** (`schema-fits`): Stacking Yoast or Rank Math alongside review, FAQ or page-builder plugins emits competing `Organization` and `WebPage` blocks on the same URL.
- **Multiple H1s in block & builder templates** (`one-h1`): Theme headers wrap the site logo in `<h1>` or hero blocks add a second `<h1>` alongside the post title.
- **Redirect chains & taxonomy bloat** (`direct-links`): Years of slug edits, `/category/` changes and thin tag archives waste crawl budget and dilute internal link authority.

## The WordPress agentic SEO loop

1. **Crawl the live WordPress site** (`clickd_brief`): Run clickd_brief and clickd_structure to map redirect chains, orphan posts, duplicate titles and broken schema.
2. **Fix PHP or block templates** (`page-system`): Your agent edits `functions.php`, `single.php` or `templates/*.html` in your Git-tracked theme so fixes apply across every post.
3. **Update post metadata cleanly** (`on-page-seo`): For individual post titles, excerpts and copy, your agent updates content through WP-CLI (`wp post update`) or authenticated REST calls.
4. **Flush cache & rescan** (`clickd_rescan`): Clear WP Engine, Kinsta or Cloudflare page cache after deploy, then call clickd_rescan to verify live HTML.

## Worked pattern (wp-content/themes/company/functions.php)

Emit clean, escaped Service or LocalBusiness JSON-LD from theme fields without installing another heavy plugin.

```
add_action('wp_head', function () {
  if (!is_singular('service')) return;
  $data = [
    '@context' => 'https://schema.org',
    '@type'    => 'Service',
    'name'     => get_the_title(),
    'url'      => get_permalink(),
  ];
  echo '<script type="application/ld+json">' . wp_json_encode($data, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES) . "</script>\n";
});
```

## Prompts to run on WordPress

- **Audit plugin schema & H1 collisions**: "Run clickd_brief and clickd_check (kind: "schema") on our live WordPress templates and clean up duplicate JSON-LD and extra H1 tags in our theme."
- **Clean up redirect chains & thin archives**: "Use clickd_structure and clickd_links on example.com to find internal redirect chains and orphan pages, then fix the links in our templates and menus."
- **Refresh decaying WordPress posts**: "Combine clickd_traffic with clickd_tells to find our top 5 slipping blog posts, rewrite opening answers without AI tells, and verify live."

## Paired skills

- [Technical SEO](https://clickd.com/skills/technical-seo): Audits and fixes crawlability, indexing, robots.txt, XML sitemaps, canonicals, redirect chains, server-rendered HTML and security headers in your site’s codebase, then checks every fix live with clickd.
- [On-page SEO](https://clickd.com/skills/on-page-seo): Rewrites title tags, meta descriptions, single H1s, question headings, answer-first openings, image alt text and AI writing tells in your site’s templates and content files, checked live with clickd.
- [Schema markup](https://clickd.com/skills/schema-markup): Generates, wires and validates JSON-LD structured data (Organization, LocalBusiness, Product, Service, Article, FAQPage and BreadcrumbList) from the visible facts on your pages, checked live with clickd.
- [Content refresh](https://clickd.com/skills/content-refresh): Finds pages losing Search Console clicks or carrying stale facts, diagnoses whether the drop is snippet decay, a substance gap or internal overlap, updates the page in code, and checks live with clickd.

## Questions

### Does clickd require installing a WordPress plugin?

No. clickd crawls your public URLs from the outside with zero WordPress plugins and zero database overhead. Your agent makes edits in your Git theme repository, WP-CLI or REST workflow.

### Remembering page caches: why didn’t clickd_rescan see my edit?

Managed WordPress hosts (WP Engine, Kinsta, Cloudways, Cloudflare APO) cache rendered HTML aggressively. Always purge the host cache after deploying theme or post edits before calling `clickd_rescan`.
