A WordPress plugin that automatically generates and maintains /llms.txt and /llms-full.txt files for your site — a machine-readable index that helps AI language models understand your content.
Developed by Working Model Inc
Based on the emerging llms.txt specification.
- Generates a spec-compliant
/llms.txtat your site root - Optionally generates
/llms-full.txtwith full page body content - Auto-regenerates whenever you publish, update, or delete content
- Serves files via PHP with correct UTF-8 encoding — works on any host, no server configuration required
- Respects noindex settings from Yoast SEO and RankMath
- Supports ACF — extracts text from custom field content when post_content is empty
- Upload the
wm-llms-file-generatorfolder to/wp-content/plugins/ - Activate the plugin via Plugins → Installed Plugins
- Go to Settings → LLMs File to configure
Click Generate Now after activation to prime the cache immediately.
| Setting | Description |
|---|---|
| Enable | Master on/off switch for file generation |
| Site Description | A paragraph describing your site, included at the top of llms.txt. Falls back to your WP tagline if left blank. |
| Include Post Types | Which post types (Pages, Posts, custom types) appear in the file |
| Include Taxonomy Archives | Optionally include category, tag, and custom taxonomy archive URLs |
| Exclude Posts / Pages | Comma-separated post IDs to omit |
| Auto-Regenerate | Regenerate automatically on publish, update, delete, theme switch, or permalink change |
| Generate llms-full.txt | Also produce /llms-full.txt with complete page body text |
| Max File Length | Character cap for llms-full.txt (default: 100,000) |
Files are served via WordPress rewrite rules and PHP, which always sends Content-Type: text/plain; charset=UTF-8. Generated content is cached in a WordPress transient (refreshed weekly or on regeneration) so requests are fast. No physical files are written to the filesystem — no Apache or Nginx configuration needed.
Hooks into save_post, transition_post_status, wp_trash_post, before_delete_post, wp_update_nav_menu, switch_theme, and permalink_structure_changed. A 5-second debounce transient prevents excessive regeneration during bulk operations. A WP-Cron job also runs daily as a safety net.
When a post's post_content is empty or sparse (common with ACF-driven pages), the plugin calls get_fields() and recursively extracts text from all field values. Media fields, attachment objects, URLs, and metadata strings are automatically filtered out.
Posts marked as noindex in Yoast SEO or RankMath are automatically excluded.
Full page content is cleaned before output: Gutenberg block comments, shortcodes, <style> and <script> blocks, and all HTML tags are stripped. HTML entities are decoded and whitespace is normalised. Content is truncated with a notice if it exceeds the configured character cap.
# Site Name
> Site tagline
Optional site description paragraph.
## Pages
- [About](https://example.com/about/): Brief description.
- [Contact](https://example.com/contact/): Get in touch.
## Posts
- [Post Title](https://example.com/post-slug/): Post excerpt.
## Categories
- [News](https://example.com/category/news/): Latest news articles.
- WordPress 6.4+
- PHP 8.1+
Requires wp-env and Composer.
npx wp-env start
composer install
composer test- Renamed plugin slug and all identifiers to
wm-llms - Fixed character encoding issues (
…) by serving files via PHP instead of writing physical files — PHP always sendsContent-Type: text/plain; charset=UTF-8 - Generated content now cached in WordPress transients instead of the filesystem
- Fixed
.htaccesscharset block for Apache UTF-8 serving - Fixed truncation notice reporting incorrect omitted entry count
- Fixed
mb_substr/mb_strlenfor multibyte-safe excerpt truncation - Fixed HTML entity encoding (
&, non-breaking spaces) in output - Fixed Unicode line separator (U+2028) corruption in post titles
- Fixed attachment metadata polluting ACF content extraction
- Initial release
llms.txtgeneration with post types and taxonomy archivesllms-full.txtoptional variant with full body content- Yoast SEO and RankMath noindex support
- ACF field content extraction
- Auto-regeneration hooks + WP-Cron daily fallback
- 57 PHPUnit tests
GPL-2.0-or-later — see LICENSE.