How to Add an llms.txt File to WordPress

- WordPress serves /llms.txt from the web root, not from a post, a page, or a theme folder.
- Create a plain text file called llms.txt and upload it beside wp-config.php using SFTP, your host's file manager, or a plugin.
- A caching plugin or a CDN can serve a stale copy or a cached 404, so purge the cache and check the live URL after uploading.
- Publishing the file is a cheap bet. Adoption is partial, and no major AI operator documents it as a signal their crawlers follow.
- Only your server's own request log shows whether a crawler actually fetched it.
The answer is simple: put a plain text file named llms.txt in your WordPress web root, the same folder that holds wp-config.php. Your site then serves it at yourdomain.com/llms.txt. It takes a few minutes, and you never touch a theme file or write any PHP.
What llms.txt actually is
An llms.txt file is a plain text document at the root of your domain. It gives an AI system a short, curated map of your site: a title, a one-line summary, and a list of links with brief descriptions.
It is not a magic switch. Publishing one is a cheap bet, not a ranking lever. Adoption is partial. No major operator has publicly committed to honouring llms.txt, and neither OpenAI, Anthropic nor Google documents it as a signal their crawlers follow. Several documentation platforms and developer tools do read it. That is the honest state of things.
Publishing the file is not the same as a crawler fetching it. You can put a perfect llms.txt at your root and never see one request for it. Only a site's own server sees which of those two things happened. For a wider playbook on getting found in AI answers, The Small Business Guide to AEO covers the parts that matter more.
Where the file goes, and where it does not
This trips people up constantly. WordPress has no "publish an llms.txt" button, and the file does not belong in a post.
| What people try | Where it ends up | Does it work |
|---|---|---|
| New post or page | /llms-txt/ or a dated slug | No |
| Media library upload | /wp-content/uploads/2026/01/ | No |
| Theme folder | /wp-content/themes/your-theme/ | No |
| Web root upload | /llms.txt | Yes |
| Host redirect rule to a page | /llms.txt rewritten | Sometimes, and fragile |
The web root is the directory that holds wp-config.php, wp-content, wp-admin, and wp-includes. That is the only place WordPress will serve a raw .txt file from the URL you want.
Warning: clear your cache before you test
Before you run the step below, know this. A caching plugin or a CDN can serve a stale copy of /llms.txt, or a cached 404, for hours after you upload. If you test immediately and see a 404, the file is probably fine and the cache is lying to you.
After uploading, purge the cache in your caching plugin. Then purge it at your CDN if you use one. Most CDN dashboards have a purge or invalidation option, and it takes one click.
Step 1: Write the file
Open a plain text editor. Notepad, TextEdit in plain text mode, or a code editor all work. A word processor will add formatting characters that break the file.
A minimal version looks like this:
# Your Site Name
> One sentence describing what you do and who you do it for.
## Pages
- [About](https://example.com/about): who runs this site
- [Services](https://example.com/services): what you sell
- [Blog](https://example.com/blog): recent articles
Keep it short. Ten to twenty links is plenty. Point at your most useful pages, not every post you have ever written. Save the file as llms.txt. Make sure your editor does not silently save it as llms.txt.txt, which is the most common mistake here on Windows.
Step 2: Upload it to the web root
Three routes, pick one.
SFTP or SSH. Connect with your host's credentials and drop llms.txt into the same directory as wp-config.php. This works on every host and gives you the cleanest result.
Your host's file manager. Most shared hosts run cPanel or a custom panel with a file browser. Open public_html or www, then upload the file there.
A plugin. A few plugins will write the file to the web root for you. Check that the plugin writes to the actual document root and not to an uploads folder.
Whichever route you take, confirm the file sits at the root level and not inside wp-content or a subfolder.
Step 3: Check the live URL
Visit https://yourdomain.com/llms.txt in a private browser window. You want a 200 response with the text you wrote. A 404 means the file is in the wrong directory, or the cache is still stale. Purge again and wait a few minutes.
Some hosts disable direct access to .txt files through a security rule, and that will show up here. Add an exception for llms.txt in that case.
You can also confirm from the command line: curl -I https://yourdomain.com/llms.txt. A 200 with text/plain is what you want.
Does anyone actually read it?
Maybe. That is the honest answer. Google Search Console will not tell you, and a pageview-only analytics setup will not tell you either.
The one place that shows it is your server's own request log. If you want to see it without reading raw logs, Kymo documentation explains how AI crawler events are classified and where they appear in the dashboard. It also covers cookieless identity, which is how Kymo counts human visitors without cookies or a persistent ID.
The bigger question is which AI crawlers already reach you, and whether any of that turns into traffic. PerplexityBot and Claude-SearchBot (Anthropic's search index crawler) are both indexers that can lead to referral traffic. Training crawlers like GPTBot and ClaudeBot send none. That distinction matters more than the file. Should You Block AI Training Bots but Allow Answer Bots? walks through it.
If you want the numbers behind this, AI Visibility Score: What It Measures and What's a Good One explains what is measurable today. If you are new to reading analytics at all, start with the Analytics basics category before you chase a crawler report.
A note on pricing
Kymo measures AI crawler visits and human traffic in one dashboard. Solo is $9 a month, or $90 a year, for up to 10,000 events a month. Studio is $29 a month, or $290 a year, for up to 100,000 events a month. Every feature is included on both plans; they differ only by event volume. AI crawler tracking does not count against your event limit. Both plans start with 14 days free, no card required. Exceed your event limit and the dashboard pauses, and your data stays put.
What I would do
Publish the llms.txt if you already maintain a decent site map and you like tidiness. It costs ten minutes and it might help a documentation platform read your pages correctly. Do not rewrite your content strategy around it, and never treat it as a requirement.
Spend the real effort on fast pages and clear answers, plus a way to see which AI crawlers actually show up. Add the file if you're the kind of person who wants the box ticked. Then go look at your logs.
See what already crawls you
Run the free AI visibility check on your own domain. It reads a URL from public signals only, so your site does not need Kymo installed, and the report arrives by email. If you want the ongoing version, start tracking it to see which AI engines fetch your pages and what traffic comes back.
Start free → 14-day free trial. No card required.