How to Add llms.txt on WordPress

Three ways to publish the file, a check that it works, and an honest note on expectations. The job takes about five minutes with a plugin.

Updated 1 November 20266 min read

Short answer

To add llms.txt on WordPress in about 5 minutes, switch on the feature in Yoast SEO (free) or the LLMS Txt module in Rank Math, or upload a hand-written Markdown file named llms.txt to your site root. Then open yoursite.com/llms.txt to check it loads. Expect no ranking benefit: Google says Search does not use the file.

Which method to use

If you already run Yoast SEO or Rank Math, use that. If you run neither, a hand-written file is simpler than installing a plugin for this alone.

Method Effort Best for Watch out for
Yoast SEO One setting, then a preview Sites already on Yoast Automatic selection may include pages you would not choose, so review the preview
Rank Math Switch on a module, then set options Sites already on Rank Math Empty until configured; posts set to noindex are excluded
Manual upload Write one file, upload it once Small sites, or no suitable plugin You must update it by hand when pages change

Use one method only. If a plugin and a physical file both exist, the one your server serves first wins, so check what loads.

Before you start, read what llms.txt is and whether you need one. The short version is that Google says Search does not use the file, and none of the OpenAI, Anthropic or Perplexity crawler documentation we read says their search crawlers use llms.txt.

Method 1: Yoast SEO

Yoast describes its llms.txt generator as built in, free for everyone and available without an upgrade. You turn it on in your site's feature settings in WordPress. It creates a Markdown file that describes what your site covers and points to your most important content, either with automatic selection of key pages or in a manual mode where you choose them. It also offers a preview before publishing and refreshes the file automatically. Yoast says the file is for AI assistants and not for search engines, and makes no promise about AI visibility.

Method 2: Rank Math

  1. Go to Rank Math SEO and then Dashboard, and find the LLMS Txt module.
  2. Turn the toggle on. If you cannot see it, update Rank Math first.
  3. Open the module's settings, or go to General Settings and choose Edit llms.txt.
  4. Choose post types (posts or pages) and taxonomies such as categories. The posts and terms limit defaults to 100. You can add custom links or text, one per line.
  5. Save, then use the preview link to view the file, which is normally at yoursite.com/llms.txt.

Rank Math's own page calls llms.txt a proposal and not an official standard, notes that adoption across AI platforms is limited, and does not say whether the module needs a paid plan. Check your own license.

Method 3: Manual upload

  1. Write the file in a plain text editor in this order: a single # heading with your business name; a > line with a one-sentence summary; then ## headings, each followed by a list of links like - [Page name](https://yoursite.com/page): one-line note.
  2. Save it as llms.txt, in plain text with UTF-8 encoding.
  3. Upload it to the site root, which is the folder that holds your wp-content folder, using SFTP or your host's file manager.
  4. Load yoursite.com/llms.txt in a browser.

A complete file for a small WordPress site

This one is illustrative: an invented six-page business site, written by hand for Method 3. It shows how short a useful file can be.

# Marina Accounting Services

> Small accounting practice in Limassol serving local companies and sole traders. Fees are published and every service page states what is included.

## Services
- [Bookkeeping](https://example.com/bookkeeping/): monthly bookkeeping, what is included, how fees are set
- [Payroll](https://example.com/payroll/): payroll runs, payslips and filing, with fee per employee
- [Year-end accounts](https://example.com/year-end/): preparing statements and the documents we need from you

## Practical
- [Fees](https://example.com/fees/): current fee table
- [Contact](https://example.com/contact/): address, phone, opening hours, how to book a call

Anything beyond this is optional. A site with 200 posts does not need all 200 listed, and a plugin set to include every post makes the file longer without making it more useful.

What to put in it

  • Between 5 and 20 pages that matter: services, pricing, contact, your best guides.
  • A one-line note on each, in plain words, stating what the reader finds.
  • Only public, indexable pages. Rank Math leaves out noindex posts, and you should too.
  • For a bilingual site, group pages by language under separate headings.
  • Nothing you would not want a stranger to read, since the file is public.

Check that it works

  1. The address loads as plain text, not your theme's 404 page.
  2. Every link opens and uses your live address, not a staging one.
  3. A caching plugin or CDN is not serving an old copy. Purge the cache after changes.
  4. The file does not conflict with another plugin's output.
  5. Your robots.txt does not block the file.

Common problems and fixes

Symptom Likely cause Fix
The address shows your theme's 404 page No file exists, or the plugin feature is off Turn the feature on, save, and reload; or upload the file
An old version still loads Page or CDN cache Purge the cache plugin and the CDN, then reload
Links point to a staging address The file was copied from a test site Regenerate it, or search and replace the staging domain
The file lists pages you hid from search Manual file, or a plugin setting that ignores noindex Remove them; Rank Math skips noindex posts by default
The file is empty Rank Math's module is on but not configured Choose post types, then save
Two different versions appear A plugin and an uploaded file both exist Remove one, so only one source remains
A security plugin blocks the address Rules that block unknown text files Allow the path in the plugin settings

If the file seems to work but you want proof, load it in a private browser window, because logged-in views can differ from what a crawler gets.

Keep it current

A stale file is worse than none, because it points to pages that have moved or changed. Put a line in your monthly routine: open the file, click five links, check that the summary line still describes the business. If your plugin refreshes the file automatically, as Yoast says its feature does, you only need to check the output occasionally. If you maintain it by hand, update it whenever you add, remove or rename a key page.

Schema markup is a different job

People often search for llms.txt and schema in the same breath. They do different things. Structured data helps search engines read specific facts and can make a page eligible for rich results, and Google's guide says no special markup is needed for its AI features. Our schema markup guide covers when it is worth the effort.

Keep expectations right

Adding the file will not change your Google rankings, and it may do nothing for assistants. Fix crawl access first. The ChatGPT search checklist is a better first use of your afternoon, and our AI search optimization service can run the checks for you. Install nothing until you have confirmed your key pages are indexed.

Sources

  1. Yoast, llms.txt feature
  2. Rank Math, llms.txt documentation
  3. llmstxt.org, the /llms.txt file proposal
  4. Google Search Central, optimizing your website for generative AI features
  5. OpenAI, overview of OpenAI crawlers
  6. Anthropic, does Anthropic crawl data from the web
  7. Perplexity, crawlers and user agents

Frequently asked questions

How to create an llms.txt file in WordPress?

Use the llms.txt feature in Yoast SEO or Rank Math if you have either plugin, or write a Markdown file by hand and upload it to your site root through SFTP or your host's file manager. Then load the address in a browser to confirm it works.

How to add schema markup in WordPress?

Most SEO plugins can output structured data, and a developer can add custom markup. Check what your site already outputs before adding more, and validate it with Google's testing tools. Google says AI features need no special schema, so add it for rich results, not for AI.

Does Yoast SEO create llms.txt for free?

Yes. Yoast's feature page describes its llms.txt generator as built in and free for everyone, available in one click. It selects key pages automatically or lets you choose them, and shows a preview before publishing.

Where does the llms.txt file go?

At the root of your domain, so it loads at yoursite.com/llms.txt. The proposal also allows a file at a subpath, such as a documentation folder, where it applies to the URLs beneath it. On WordPress, the root is what most sites need.

Keep reading

Free audit

Let us tell you what to fix first.

Send us your website and we will send back a short, honest audit of what is holding it back.

Request a free audit