How to Add llms.txt to WordPress
Publish a plain-text llms.txt from the document root of a self-hosted WordPress site.
Setup steps
Write a UTF-8 text file
Save this example as llms.txt, replacing the sample name and absolute links with your published site and its priority pages.
# Example Site > Product documentation and support for Example Site. ## Documentation - [Getting started](https://example.com/docs): Setup steps for new users. - [Support](https://example.com/support): Find help and contact details.Upload it to the domain’s document root
Use your host’s file manager or SFTP. The directory is often public_html. If WordPress is installed in a subdirectory, use the directory for your domain root. When your host manages this path through a plugin, update that provider instead.
Test after your CDN or page cache refreshes
Check the live root URL. If the server returns a WordPress page, confirm the upload location and review any catch-all rewrite or plugin that handles the path.
Verify the published llms.txt
Replace example.com with the published hostname and fetch the file. The final response should be HTTP 200 with the expected Markdown body and a Content-Type of text/markdown; charset=utf-8 or text/plain; charset=utf-8.
curl -fsSL -i https://example.com/llms.txtIf status 200 comes back with an HTML homepage, sign-in screen or error page, you have an HTML fallback (a soft 404). Check the final URL and fix the route or rewrite, then fetch it again.
Frequently asked questions
Should I make a WordPress Page called llms.txt?
A regular Page uses the theme’s HTML template. Upload a text file to the document root or use a provider that serves the root path as plain text.
Which file wins if my SEO plugin already publishes llms.txt?
That depends on how your host routes requests. Check which body the live root URL serves and use one provider to maintain it.
What if I cannot write to the document root?
Use your host’s supported llms.txt feature or a plugin that serves /llms.txt as text. Verify the response on the public domain.
Scan your published site
Check the live page and its robots.txt and llms.txt. The scan is free. If you want files tailored to the report, the $12 Auto-Generated Fix Pack is available from the results.
Run a free scan