Guides · WordPress

llms.txt for WordPress

A plain file uploaded to the web root is served before WordPress routing runs; do not create it as a Page.

Where the file lives

  1. Upload llms.txt to the site root, the same folder as wp-config.php, using SFTP or your host's file manager. Apache and nginx serve a real file at that path before handing the request to WordPress.
  2. Some SEO plugins offer to generate an llms.txt for you. If you turn that on, do not also upload a file: keep one source, then check the live URL with the validator to see which one the server is actually serving.

Serving it as text

  • A .txt file at the root is served as text/plain by default on Apache and nginx; nothing to configure.
  • Managed hosts and caching plugins may keep the old response for a while after you replace the file. Purge the page cache after every update, then re-validate.

The WordPress pitfall: Creating it as a Page

A WordPress Page titled “llms.txt” lives at a pretty permalink such as /llms-txt/ and is served as HTML with the theme around it. Crawlers request /llms.txt exactly, and the validator reports HTML at that path as E5.

The file must be a real file at the root, or a plugin that writes one there.

Check it

Open https://your-domain/llms.txt in a private window: you should see plain text, not your theme.

What goes in the file, section by section, is in the knowledge base. The validator checks 14 rules and shows every deduction.