How to Add an llms.txt File to a WordPress Website
The easiest way is through the SEO plugin you already use. Yoast SEO, including the free version, writes an llms.txt file to your site's root and refreshes it weekly. Rank Math has an LLMS Txt module you switch on from its dashboard, with settings for which post types and taxonomies to include. AIOSEO generates one by default. You can also write the file yourself and upload it to the WordPress root with your host's file manager or SFTP. Whichever route you choose, run only one generator. A physical file in the root is served before any plugin's dynamic version, so two methods can conflict. After enabling it, open yoursite.com/llms.txt and check the content is accurate.
Which WordPress options generate llms.txt?
| Option | How it creates the file | Updates | Control |
|---|---|---|---|
| Yoast SEO (free and Premium) | Writes a physical file to the site root | Weekly, by a scheduled action | Automatic, or manual page selection |
| Rank Math | LLMS Txt module | When settings change and content updates | Post types, taxonomies, limits, extra text |
| AIOSEO | Built-in LLMs.txt setting, on by default | Automatic | Enable or disable; optional llms-full.txt |
| Dedicated llms.txt plugins | Varies | Varies | Varies |
| Manual file | You upload llms.txt to the root |
Whenever you edit it | Full |
WordPress llms.txt plugins: how automatic and dynamic generators work
Plugins use one of two approaches:
- Physical file. The plugin writes a real
llms.txtfile into the WordPress root. Yoast does this. Its developer documentation says it uses WordPress's home path, falls back to the server's document root, and offers a filter for unusual set-ups. The file is refreshed weekly by a scheduled task. - Dynamic response. The plugin answers requests for
/llms.txtthrough WordPress, building the content when asked, without a file on disk.
The difference matters when you combine them. Web servers usually serve a real file before WordPress runs, so a physical file wins. Yoast's documentation notes that it will not overwrite an existing llms.txt file. It shows a warning instead, and you must remove the old file for Yoast to generate its own. It also notes that if another plugin serves the file dynamically, Yoast's physical file takes priority. The simple rule is to pick one method and disable the others.
Yoast vs Rank Math: which WordPress plugin generates llms.txt?
Both do, and so does AIOSEO. The differences are in what goes into the file:
- Yoast SEO includes the five most recently updated posts, pages and custom post types, giving priority to cornerstone content. Posts are included only if published in the last 12 months. You can switch to manual page selection to choose pages yourself. The feature is available in the free version, is not available on multisite, and adds a UTF-8 byte order mark to the file by default.
- Rank Math lets you choose post types and taxonomies, set a maximum number of posts or terms, and add extra links or text by hand. It suits sites that want more listed than Yoast's short default.
- AIOSEO enables llms.txt by default under Sitemaps, LLMs.txt, and can also produce an
llms-full.txtfile.
For most sites, use whichever plugin you already run for SEO rather than adding another. Their wider AI features are compared in the best WordPress plugin for SEO, AEO and GEO.
Rank Math’s LLM setting: what it does and how to turn it on
Rank Math's setting is a module that builds your llms.txt file from your content. To turn it on, according to Rank Math's knowledge base:
- Go to Rank Math SEO, then Dashboard, in the WordPress admin.
- Find the LLMS Txt module and switch the toggle on.
- Open its settings, from the module's settings icon or Rank Math SEO, General Settings, Edit llms.txt.
- Select post types, such as Posts and Pages.
- Select taxonomies, such as Categories, if you want them listed.
- Set a limit for the number of posts or terms.
- Add extra content, such as a short description of your business or links not covered by the lists.
- Save changes, then use the preview link to open the live file.
Rank Math's own guidance notes that adoption of llms.txt across platforms is still limited. Treat the setting as a convenient extra rather than a visibility switch.
How do you add a file manually?
- Write the file in Markdown, following the llms.txt format: a heading with your site name, a one-line summary, then lists of key pages. Guidance is in how to write an llms.txt file.
- Upload it to the WordPress root, the same folder as
wp-config.php, using your host's file manager or SFTP. - Disable any plugin llms.txt feature, or it may warn about the existing file or be overridden by it.
- Keep it current by hand when pages change.
A manual file gives full control but needs maintenance. If you want both control and automation, Yoast's manual page selection or Rank Math's extra-content field is a middle ground.
How do you check it is working?
- Open
yoursite.com/llms.txtand read it. It should load as text, not a 404 or your theme's page. - Check caching. Page caching or a CDN can keep serving an old version; purge the cache after changes.
- Check security plugins and firewalls that block unfamiliar paths or bots.
- Watch for Yoast's warning that the file could not be generated. It usually means an existing file or file permissions are in the way.
- Check for a stray byte order mark if a tool reports the file as malformed. Yoast adds a UTF-8 byte order mark by default, and its documentation provides a filter to remove it.
- Check subdirectory installs. If WordPress runs in a subfolder, the file must still be served at the domain root, not inside the folder.
Is it worth doing on WordPress?
It takes a minute with any of these plugins, which is the main argument for it. The evidence that it improves AI visibility is weak: Google says it does not use llms.txt, and server-log studies find few AI crawlers request it. Time is better spent on content, crawler access and structured data. The evidence is covered in whether llms.txt improves AI search visibility, and other platforms in how to add llms.txt on Webflow, Framer, Next.js or any CMS.
We have not compared the plugins' output across live sites ourselves. This page is based on Yoast's, Rank Math's and AIOSEO's documentation.
What might this look like in practice?
Consider an illustrative accountancy firm, Wembstead Partners, running WordPress with Yoast. Its llms.txt listed five recent blog posts but none of its service pages, because Yoast's default favours recently updated content. The office manager switched to manual page selection and chose the tax, payroll and bookkeeping service pages, the fees page and the contact page. A leftover file from an old plugin had been blocking Yoast's version, so she deleted it through the host's file manager first. The new file loaded correctly after the cache was cleared.
What do people ask about llms.txt on WordPress?
Does Yoast SEO free include llms.txt?
Yes. Yoast generates llms.txt in all versions, including the free plugin, but not on multisite.
How often does Yoast update llms.txt?
Weekly, through a scheduled action.
How do I turn on llms.txt in Rank Math?
Enable the LLMS Txt module in Rank Math SEO's Dashboard, then configure it under Edit llms.txt.
Can I use two llms.txt plugins at once?
It is best not to. A physical file overrides dynamic versions, so the results can conflict.
Published by The Kovmere Team · updated Sep 29, 2026 · More resources