Short answer: add a plain-text file called llms.txt to your WordPress site’s root directory so it loads at yoursite.com/llms.txt. WordPress has no built-in setting for this, so you either upload the file via your host’s file manager or FTP, or serve it with a small snippet in your theme. Both methods take under ten minutes.
This guide covers three ways to do it, how to verify it works, and what to actually put in the file. If you want the file generated for you first, use our free llms.txt generator.
What llms.txt is (and what it is not)
llms.txt is a proposed standard for a markdown file at your domain root that gives AI systems a curated map of your most important content. Think of it as the opposite of robots.txt: robots.txt controls access, llms.txt describes meaning.
Be clear-eyed about its status. No major AI provider has publicly committed to reading llms.txt, and adding one will not by itself get you cited. It costs a few minutes, carries no SEO risk, and signals machine-friendliness — that is the honest case for it. The things that genuinely move AI visibility are covered in our LLM SEO guide.
Method 1: Upload via your host’s file manager (easiest)
This is the method we recommend for most people, because the file is served directly by the web server with no PHP involved.
- Generate your file content — the llms.txt generator outputs a valid file you can download.
- Log in to your hosting control panel (cPanel, Plesk, SiteGround Site Tools, Hostinger hPanel and so on) and open the File Manager.
- Navigate to your site’s root folder — the one containing
wp-config.php,wp-contentand usuallyrobots.txt. It is typically calledpublic_html,htdocsorwww. - Upload your
llms.txtfile there. Do not put it insidewp-contentor your theme folder. - Visit
yoursite.com/llms.txtin a browser to confirm it loads.
If you prefer FTP, the process is identical — connect with FileZilla or similar and drop the file in the same root directory.
Method 2: Serve it from your theme with a snippet
If you cannot access the filesystem — some managed hosts restrict it — you can have WordPress serve the file itself. Add this to your child theme’s functions.php or a code-snippets plugin:
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;
}
header('Content-Type: text/plain; charset=utf-8');
echo "# Your Site Name\n\n";
echo "> One-sentence description of what your site does.\n\n";
echo "## Key pages\n\n";
echo "- [LLM SEO Guide](https://example.com/llm-seo): Complete guide to AI search optimization\n";
exit;
});
After adding the snippet, go to Settings → Permalinks and click Save Changes once. That flushes the rewrite rules so the new URL resolves. Then check yoursite.com/llms.txt.
Edit code on a staging site first if you can, and always use a child theme — a parent theme update will wipe changes made directly to its files.
Method 3: Use a plugin
Several plugins now generate llms.txt automatically from your published content. They are convenient, but they tend to dump every post and page into the file, which defeats the purpose — the value of llms.txt is that it is curated. If you use one, prune the output to the pages that genuinely represent your site.
What to put in the file
Keep it short and high-signal. A good llms.txt has an H1 with your site name, a one-line blockquote description, optionally a short paragraph of context, and a curated list of your most important URLs with brief notes on each.
# Acme Analytics
> Product analytics for small SaaS teams.
Acme Analytics helps product teams track activation and retention
without a data warehouse. Founded 2021, used by 400+ teams.
## Key pages
- [Pricing](https://acme.com/pricing): Plans, limits and free tier
- [Docs](https://acme.com/docs): Setup guides and API reference
- [Comparison](https://acme.com/vs-mixpanel): How we differ from Mixpanel
Ten to thirty links is plenty for most sites. Every URL should be a page you would be happy to have quoted in an AI answer.
How to verify it worked
Load yoursite.com/llms.txt in a private browsing window. You should see plain text, not a 404 page and not your theme’s layout. If the file downloads instead of displaying, the content type is wrong — that is normal for the upload method and harmless.
Common failures: the file was uploaded into a subfolder rather than the root; a caching layer or CDN is still serving a 404, so purge the cache; or on the snippet method, permalinks were not re-saved after adding the code.
Does llms.txt actually do anything? The honest answer
Before you spend an afternoon on this, you deserve the counter-evidence, because it is stronger than most guides admit.
In July 2026 Google published official guidance on optimising for generative AI features, and it addresses this directly: “You don’t need to create new machine readable files … to appear in Google Search.” Its separate AI features documentation adds that there are “no additional requirements to appear in AI Overviews or AI Mode, nor other special optimizations necessary.”
No major AI provider has publicly committed to reading llms.txt. It is a proposed convention with real adoption among developer-tooling sites and no confirmed consumption by the large assistants. Anyone telling you it is required is overstating the evidence.
So why do it at all? Three defensible reasons. It costs about ten minutes. It forces you to write a clear, structured summary of what your site covers, which is a useful exercise regardless. And if adoption does arrive, you are already there. What it is not is a substitute for the work that demonstrably matters — being crawlable, being structured for passage retrieval, and being credible enough to cite.
One thing llms.txt definitively does not do is control crawler access. That is robots.txt territory, and the two are constantly confused — see what AI crawlers are and whether they are reading your site for the controls that genuinely work.
The step that actually matters more
While you are in your site’s root directory, open robots.txt and check you are not blocking AI crawlers. Many sites added blanket blocks for GPTBot, ClaudeBot, PerplexityBot and Google-Extended in 2023 and forgot about them. If those crawlers cannot fetch your pages, no llms.txt file will help — this is the single most common self-inflicted AI visibility problem we see.
Once both are sorted, check where you actually stand with our free AI Visibility Checker, or score a specific page with the GEO Audit.
Common questions
Does llms.txt help my Google rankings?
No. Google has stated you do not need new machine-readable files to appear in Search, and llms.txt is not a documented ranking or eligibility signal. Treat it as optional preparation, not optimisation.
Is llms.txt the same as robots.txt?
No, and the difference matters. robots.txt is a standardised access-control file defined by RFC 9309 and honoured by cooperative crawlers. llms.txt is an unstandardised content-summary file with no access-control function whatsoever.
Will WordPress overwrite my llms.txt file?
A file uploaded to the site root survives WordPress core updates but can be lost during a host migration or a full-site restore. If you used the theme snippet method, a theme update will remove it unless the snippet lives in a child theme or a site-specific plugin.
How often should I update it?
Whenever your site structure changes materially — new sections, retired pages, a rebrand. A stale llms.txt pointing at URLs that no longer exist is worse than none at all.
What should I do instead, if anything?
Make sure AI search crawlers are not blocked, that your content exists in the initial HTML rather than only after JavaScript runs, and that each section answers its heading in the opening sentences. Those three things have measurable effects. Start with what answer engine optimization actually means.
