Make your WordPress site discoverable by AI. Auto-generate and maintain llms.txt files, audit content for AI-search readiness, and serve per-page markdown variants - all from a single plugin with no external dependencies.
WordPress.org slug: llms-txt
Requires: WordPress 6.0+ / PHP 8.1+
License: GPL v2 or later
llms.txt is an emerging web standard that provides a curated, markdown-formatted index of a website's most important content, designed for consumption by large language models (ChatGPT, Claude, Perplexity, Google AI Overviews). Over 844,000 websites have adopted it, including Anthropic, Cloudflare, and Stripe.
WordPress sites need a way to generate and maintain this file automatically as content changes. That's what this plugin does.
- Auto-generates
llms.txtandllms-full.txtfrom your WordPress content - Per-page
.mdendpoints - serve markdown variants of any post or page - Setup wizard detects your site's content structure and proposes sections
- Curation UI - organize posts into named sections, override titles and descriptions, set sort order
- Search-and-select post picker - find content by title instead of hunting for post IDs
- 12-rule quality auditor - flags missing H1s, thin meta descriptions, duplicate titles, generic headings, boilerplate intros, stale content, and more
- robots.txt integration - adds
llms.txtand missing sitemap references <link rel="llms">injection in<head>for AI-bot discoverability- WP Engine / Kinsta support - auto-detects managed hosts that block dynamic
.txtserving and writes physical files instead - Instant updates - section edits, settings changes, and post saves immediately regenerate the file
The plugin hooks into WordPress's content lifecycle:
- On activation, a setup wizard scans your site and suggests an initial section structure
- On every post save, the llms.txt cache is invalidated and the file is regenerated
- Daily via cron, a full-site audit runs and both
llms.txtandllms-full.txtare refreshed - On demand, you can edit sections, reorder content, and trigger manual regeneration
The description for each entry is resolved through a 10-priority chain: manual override, Yoast/RankMath/AIOSEO/SEOPress meta description, post excerpt, first sentence of content - each passing through quality gates that reject boilerplate, sales pitches, and too-short text.
git clone https://github.com/xantus-ai/wp-llms-plugin.git
cd wp-llms-plugin
./build.shUpload the resulting llms-txt.zip via WP Admin → Plugins → Add New → Upload Plugin.
- Copy the
plugin/directory towp-content/plugins/llms-txt/ - Run
composer install --no-devinside the plugin directory - Activate through the WordPress Plugins menu
- Go to llms.txt in the admin sidebar
- Run the setup wizard
- Visit
/llms.txton your site to verify
├── README.md # This file
├── generator-spec.md # Algorithm specification for the generator/audit engines
├── build.sh # Builds uploadable llms-txt.zip
├── bump-version.sh # Bumps version across all source-of-truth files
└── plugin/ # WordPress plugin source
├── llms-txt.php # Bootstrap + WP plugin header
├── composer.json # PSR-4 autoload + league/html-to-markdown
├── readme.txt # WordPress.org listing format
├── uninstall.php # Cleanup on plugin delete
├── CHANGELOG.md # Keep a Changelog format
└── src/ # PHP source (namespace WPLlms\)
├── Plugin.php # Singleton, registers all hooks
├── Activator.php # Activation: tables + options + cron + rewrite flush
├── Deactivator.php # Deactivation cleanup
├── Admin/ # Admin menu + page renderers
├── Audit/ # 12 audit rules + orchestrator + persistence
├── Cron/ # Daily scheduler
├── Frontend/ # File serving, host detection, robots.txt, head injection
├── Generator/ # llms.txt/llms-full.txt/md generation engine
├── Setup/ # Wizard, site detector, section suggester
└── Storage/ # DB schema, repositories, options wrapper
Note on naming: the user-facing plugin name is
llms.txt for WordPress(WP.org slugllms-txt). The internal PHP namespace and identifier prefixes useWPLlms\/WPLLMS_/wpllms_for historical reasons — these are not user-visible and are kept stable to avoid DB migrations.
| Component | Choice |
|---|---|
| Language | PHP 8.1+ |
| WordPress | 6.0+ |
| Autoloading | PSR-4 via Composer (with fallback) |
| Markdown conversion | league/html-to-markdown |
| Storage | Custom MySQL tables + wp_options |
| Admin UI | Server-rendered HTML + WordPress admin styles |
| Cron | WordPress wp-cron |
./build.shRuns composer install --no-dev, checks PHP syntax, and produces llms-txt.zip ready for WordPress upload.
./bump-version.sh 0.2.0Updates the version in plugin/llms-txt.php (header + constant), plugin/readme.txt, and plugin/CHANGELOG.md.
find plugin/src -name "*.php" -exec php -l {} \; 2>&1 | grep -v "No syntax errors"Empty output means clean. The build script runs this automatically.
| Thing | Pattern |
|---|---|
| User-facing name | llms.txt for WordPress |
| WP.org slug | llms-txt |
| Text domain | llms-txt |
| PHP namespace | WPLlms\ |
| Composer package | xantus/wpllms |
| Hook/option/transient prefix | wpllms_ |
| DB table prefix | {$wpdb->prefix}wpllms_ |
| Constants prefix | WPLLMS_ |
| Filter names | wpllms_* |
| Rule | Severity | What it checks |
|---|---|---|
missing_h1 |
Critical | No <h1> in page body |
multiple_h1 |
Warning | More than one <h1> |
generic_h1 |
Warning | H1 matches site tagline or appears on multiple pages |
short_title |
Warning | Title under 30 characters |
long_title |
Info | Title over 65 characters |
thin_meta |
Warning | Meta description missing or under 70 characters |
duplicate_title |
Warning | Title matches another post (exact or Levenshtein > 0.85) |
thin_content |
Warning | Page with under 300 words |
boilerplate_intro |
Warning | Opening text contains CTA phrases or matches site tagline |
stale_content |
Info | Not modified in over 24 months |
no_internal_links |
Info | Zero internal links in content |
no_h2_headings |
Info | Over 800 words with no H2 subheadings |
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
The algorithm specification in generator-spec.md documents the contracts for the generator and audit engines - read it before modifying those components.
GPL v2 or later. See LICENSE.
Built by Xantus AI.