WordPress guide

Adding llms.txt

/llms.txt is a single Markdown file at your site root that gives AI agents a curated map of the pages you actually want them to read. Two ways to add it on WordPress:

ApproachProsCons
Static file via FTPZero plugin overhead, full controlManual updates on new pages
mu-plugin from sitemapAuto-updates with new postsSlightly more setup

1. Static file (recommended for <50 pages)

Upload this file to your WordPress root as llms.txt:

markdown
# Your Site Name > One-line description of what the site is about. ## Pages - [About](https://yoursite.com/about): What the company does. - [Pricing](https://yoursite.com/pricing): Plans and costs. - [Docs](https://yoursite.com/docs): Product documentation. ## Optional - [Changelog](https://yoursite.com/changelog): Release history.

2. Auto-generated mu-plugin

php
<?php // wp-content/mu-plugins/llms-txt.php add_action('init', function () { add_rewrite_rule('^llms\.txt$', 'index.php?llms_txt=1', 'top'); }); add_filter('query_vars', fn($v) => array_merge($v, ['llms_txt'])); add_action('template_redirect', function () { if (!get_query_var('llms_txt')) return; header('Content-Type: text/markdown; charset=utf-8'); echo "# " . get_bloginfo('name') . "\n\n> " . get_bloginfo('description') . "\n\n## Pages\n"; foreach (get_pages(['sort_column' => 'menu_order']) as $p) { echo "- [" . $p->post_title . "](" . get_permalink($p) . ")\n"; } exit; });
After deploying
Visit https://yoursite.com/llms.txt. If it renders as Markdown text (not your homepage), re-run your AI Grader by Magnetic WP scan — the B2 check will flip to green.