How to Add llms.txt to WordPress: 3 Methods and Who Reads It

Add llms.txt to WordPress by serving a Markdown file at yoursite.com/llms.txt, using a plugin, a file upload to the web root or a rewrite rule. Google does not need it: its AI features page (opens in a new tab) says there are no additional requirements to appear in AI Overviews or AI Mode. This guide shows how to add llms.txt to WordPress each way, gives a sample file for a blog, and ends with the test that proves the file is live.

Key takeaways

  • Pick the web-root upload if you can reach the file manager or SFTP, because a static file has no plugin to conflict with.
  • Google’s AI features page (last updated 2025-12-10) says you don’t need AI text files to appear in AI Overviews or AI Mode.
  • Only the H1 is required in the file; a blockquote summary and H2 lists of links are the usual shape.
  • Run curl -I against /llms.txt and confirm a 200 status and a text content type before you call it done.

Add llms.txt in three ways, but Google doesn’t need it

The file sits at yoursite.com/llms.txt and gets there by a plugin, a static upload or a rewrite rule. Google says it is not required for its AI features. Some AI tools and documentation sites do read it, so the file has a use, but better Google visibility is not one of them.

Google’s page states it directly: "You don’t need to create new machine readable files, AI text files, or markup to appear in these features." To be a supporting link in AI Overviews or AI Mode, a page must be indexed and eligible to show with a snippet, and Google lists no additional technical requirements. If you are adding llms.txt hoping to get into Google AI Overviews, skip it and fix indexing and content instead.

So does Google use llms.txt? Google’s own documentation gives no sign that it does. It names indexing and snippet eligibility as the only conditions, which means your Generative Engine Optimization (GEO) work for Google belongs in crawlability, page content and structured data, not in a text file at the root.

Who reads it? The llmstxt.org proposal (v2) (opens in a new tab) says thousands of sites publish one, documentation platforms generate one automatically, and Chrome’s Lighthouse checks for one in its agentic browsing audits. OpenAI, Anthropic and Gemini publish llms.txt files for their own developer docs. Ollama’s docs file (opens in a new tab) is a live example: a flat list of links to .md pages.

The same page says llms.txt files are used most heavily for software documentation, where coding agents follow them to API references and tutorials. They are fetched on demand when an agent needs information, and the spec expects use mainly for inference rather than training. What decides the value for you is what your site is for. A docs or product site that agents query gains the most. A personal blog gains little, and the file is short enough to write by hand, so add it if you want to, but expect no ranking change.

Here is a short llms.txt example for a blog. Replace the example.com URLs with your own.

Markdown
# Example Dev Blog

> Tutorials on WordPress, web development and SEO. Each post names the software version it was tested on.

Posts are written by one author. Older posts may describe outdated versions, so check the date.

## Start here

- [WordPress performance checklist](https://example.com/wordpress-performance-checklist/): Caching, images and Time to First Byte (TTFB) fixes in order
- [Technical SEO audit steps](https://example.com/technical-seo-audit/): Crawl, index and internal link checks

## Reference

- [Glossary](https://example.com/glossary/): Terms used across the blog

## Optional

- [About the author](https://example.com/about/)

The spec requires only the H1. It then allows a blockquote summary, free-form notes and H2 sections holding Markdown link lists, each link optionally followed by a colon and a note. The "Optional" section is by convention the part an agent can skip when it needs a shorter context.

Two spec details matter for WordPress. A file can sit at any subpath, such as /docs/llms.txt, and where more than one applies, agents should use the most specific one. The spec also says links should point to clean Markdown versions of pages (page.md or page.html.md), which WordPress does not produce by default, so a blog usually links to normal post URLs.

You may see llms-full.txt recommended as a companion file. The llmstxt.org page covers llms.txt and .md page versions only, so I treat llms-full.txt as a tool-specific convention and would not build on it without a source from the tool you target.

How to add llms.txt to WordPress: match the method to your host

Choose by what you control. If you have file access, upload the file. If you want the content generated and you can’t edit the web root, use a rewrite rule or a plugin. All three methods produce the same URL, so you can switch later without changing anything you have published.

MethodEffortDependencyChoose it when
PluginLowestAnother plugin to update and monitorYou want a settings screen and auto-updated content
Web-root uploadLowNone, the web server serves a static fileYou have SFTP or a file manager and the content rarely changes
Rewrite rule or snippetMediumA code snippet you ownThe root is locked, or you want the list built from recent posts

I would not start with the plugin. A static file has no moving parts. In our work at TechnicalTip, the most common expensive mistake we see is choosing a plugin without considering its compatibility with other plugins and the hosting environment, which leads to performance issues or conflicts. For a 20-line text file, that risk is hard to justify.

Several SEO plugins now include an llms.txt generator, so check the plugin you already run before installing anything new.

Method A: install a WordPress llms.txt plugin and check it first

A WordPress llms.txt plugin is the quickest route when you can’t touch the server. Install it on staging first, read what it generates, and only then push it live. A generator will happily list pages you don’t want agents to follow, so review every line of its output.

  1. Check whether your SEO plugin already has an llms.txt setting before adding another plugin.
  2. If it doesn’t, open Plugins > Add New and search for an llms.txt plugin, for example Website LLMs.txt (opens in a new tab).
  3. Read the listing: last update date, the WordPress and PHP versions it declares, and the support threads for conflicts.
  4. Install and activate it on a staging copy of the site.
  5. Open its settings, choose the post types to include, and exclude drafts, thin tag pages and anything behind a login.
  6. Save, then open yoursite.com/llms.txt on staging and read every line.
  7. Repeat on production and run the test at the end of this guide.

I have not run a specific plugin for this article, so follow each plugin’s own official docs for settings. Watch for one failure in particular: a caching layer or security plugin that returns an HTML page instead of plain text.

Method B: upload a static file to the web root

The upload is the most predictable of the three methods. You create a plain text file named exactly llms.txt and place it in the folder that serves your homepage, usually public_html or the folder holding wp-config.php. The web server then serves it directly, with no PHP and no plugin involved.

  1. Save the sample file above as llms.txt in UTF-8, with your own URLs.
  2. Connect by SFTP or open your host’s file manager.
  3. Upload the file to the web root next to wp-config.php.
  4. Set permissions to 644 so the server can read it.
  5. Load yoursite.com/llms.txt in a private browser window.

If WordPress lives in a subfolder but the site answers at the domain root, upload to the folder the domain actually serves. Some managed hosts block new files in the root. If the upload is refused or the file returns a 404, move to Method C.

The cost is upkeep. A static file goes stale as you publish new articles, so review it quarterly or after a restructure, and keep it short enough to maintain by hand.

Method C: serve it with a rewrite rule or functions.php snippet

A rewrite rule makes WordPress answer /llms.txt itself and build the content from your database. Use it when the root is locked or you want the latest posts listed without hand editing. Put the code in a child theme’s functions.php or a small must-use plugin, because a parent theme update wipes any edits you make there.

PHP
add_action( 'init', function () {
    add_rewrite_rule( '^llms\.txt$', 'index.php?llms_txt=1', 'top' );
} );

add_filter( 'query_vars', function ( $vars ) {
    $vars[] = 'llms_txt';
    return $vars;
} );

add_action( 'template_redirect', function () {
    if ( ! get_query_var( 'llms_txt' ) ) {
        return;
    }
    $lines = array(
        '# ' . get_bloginfo( 'name' ),
        '',
        '> ' . get_bloginfo( 'description' ),
        '',
        '## Recent posts',
        '',
    );
    foreach ( get_posts( array( 'numberposts' => 10 ) ) as $post ) {
        $lines[] = '- [' . get_the_title( $post ) . '](' . get_permalink( $post ) . ')';
    }
    header( 'Content-Type: text/plain; charset=utf-8' );
    echo implode( "\n", $lines ) . "\n";
    exit;
} );

After saving, go to Settings > Permalinks and click Save so WordPress flushes its rewrite rules. Without that step the URL returns a 404. I have not run this snippet against a specific WordPress build for this article, so test it on staging first.

Warning: If a physical llms.txt file also exists in the web root, the server may serve that file instead of the rewrite rule’s output, so keep only one. Delete one of the two.

The spec also describes an optional HTTP Link header that points agents to a page’s Markdown version and to the llms.txt that covers it. You can add it in web server or CDN configuration without editing pages:

Http
Link: </docs/page.html.md>; rel="alternate"; type="text/markdown", </docs/llms.txt>; rel="describedby"

That only helps if you publish .md versions of pages, which a typical blog does not.

Test the URL before you trust it

The file is live when /llms.txt returns a 200 status with a text content type and every listed URL resolves cleanly. Browsers can hide two things that go wrong: a redirect, and an HTML page served by a caching or security plugin. Check the headers as well as the rendered page.

Bash
curl -I https://yoursite.com/llms.txt

Look for HTTP/2 200 and a content-type of text/plain or similar. A text/html type means something upstream is wrapping the file. If a caching plugin or a security plugin such as Wordfence sits in front of the site, purge the cache and check that it isn’t intercepting the request.

Then check the links inside the file:

  • Every URL returns 200, with no redirect chain.
  • No staging, localhost or http:// links remain.
  • Nothing listed is noindexed, private or behind a login.
  • The H1 is the first line, with no HTML or stray BOM characters before it.

If the check fails, the cause is usually one of three. A 404 on the rewrite rule means the permalinks were not saved. A text/html type means a cache or security layer is answering first. A 404 on an uploaded file means it sits in a folder the domain does not serve.

Frequently Asked Questions

How do I add llms.txt in WordPress?

Create a Markdown file named llms.txt and make it answer at yoursite.com/llms.txt. You can upload it by SFTP to the web root next to wp-config.php, install a plugin that generates it, or add a rewrite rule in a child theme. The upload is the simplest because no plugin is involved.

Does Google use llms.txt?

Google’s AI features page says you don’t need new machine readable files or AI text files to appear in AI Overviews or AI Mode. A page only has to be indexed and eligible to show with a snippet. Adding llms.txt will not change how Google surfaces your site.

Who actually reads llms.txt?

The llmstxt.org proposal says documentation platforms generate it and coding agents fetch it on demand, mainly for inference. OpenAI, Anthropic and Gemini publish one for their own developer docs. Software documentation sites benefit most, and a personal blog benefits little.

Do I need a plugin to add llms.txt to WordPress?

No. A static upload or a short rewrite rule produces the same URL. Use a plugin only if you can’t reach the server or you want the content generated automatically, and install it on staging first.

What should an llms.txt file contain?

The spec requires only an H1 with the site or project name. Most files add a blockquote summary, a short note, and H2 sections of Markdown links with optional descriptions. Put pages an agent can skip under an H2 named Optional.

Should I also create llms-full.txt?

Only if a specific tool you target asks for it. The llmstxt.org page covers llms.txt and .md page versions, not llms-full.txt, so treat it as a tool-specific convention.

Next step: run the curl command above on your own domain today, then read Google’s AI features page (opens in a new tab) and the llmstxt.org spec (opens in a new tab) side by side so you know which part of your traffic each one affects.