ScreenshotNeo

BlogHow-to

How to Add llms.txt to a WordPress Website

Create and publish llms.txt on WordPress.com or self-hosted WordPress, choose a manual or plugin-based method, and verify the public file.

By the ScreenshotNeo team1 October 20268 min read

To add llms.txt to WordPress, create a Markdown text file named exactly llms.txt, put it in your site’s root directory so it is available at https://example.com/llms.txt, and open that public URL to verify its contents. On WordPress.com, the built-in feature is available on Business and Commerce plans; self-hosted WordPress users can upload a file, use a plugin generator, or use a plugin-served endpoint if their host blocks root writes.

llms.txt is a proposal for a concise site or project overview with links to fuller material. It is not a crawler access policy: it complements a sitemap, which lists pages, and robots.txt, which concerns automated access. Adding the file does not guarantee that an AI assistant will fetch it, cite your site, or improve its rankings. Read the llms.txt proposal.

1. Choose the WordPress method

Site setup Recommended route Considerations
WordPress.com Business or Commerce Use the built-in feature, or create and upload the file manually. Business users need to activate the feature. Manual upload uses SFTP and the site root.
Self-hosted, root directory writable Upload a manually curated file or generate one with a plugin. Manual files offer direct control. Plugin output depends on its selection and exclusion rules.
Self-hosted, root writes restricted Use a plugin that serves the file through WordPress routing or another host-supported method. The endpoint may depend on rewrite rules and cache refreshes.

Choose manual creation if you want to control every entry and can upload to the root. Choose a generator if you want the file to follow content changes, but inspect its rules and output. On WordPress.com, the built-in feature is plan-gated; on self-hosted WordPress, available file and plugin options depend on your host.

2. Create and publish a manual llms.txt

  1. List the public pages an agent should read first: for example, product or service pages, documentation, About, policies, and important articles. Prefer a small, useful selection over a dump of every URL.
  2. Create a plain-text Markdown file named llms.txt. Use an H1 for the site name, an optional blockquote summary, brief context if useful, then H2 sections with Markdown links and descriptions.
  3. Upload the lowercase filename to the site root, beside the site’s root files. WordPress.com’s manual instructions call its root directory htdocs; directory names differ on other hosts.
  4. Open https://example.com/llms.txt and confirm that the intended text is publicly returned.
# Example Site

> A concise description of what this site covers and who it serves.

This site publishes documentation and practical guidance about Example Product.

## Start here
- [Product overview](https://example.com/product/): What the product does and who it is for.
- [Documentation](https://example.com/docs/): Setup instructions and reference material.
- [About](https://example.com/about/): Company and project background.

## Policies
- [Privacy policy](https://example.com/privacy/): How site and product data is handled.

Replace the example domain and descriptions with pages that exist and are accessible to your intended readers. The proposal supports an optional H1 naming the project, an optional short blockquote, optional explanatory text, and optional H2 sections containing Markdown link lists. It also describes an optional section for secondary links that can be skipped when an agent has limited context; do not put essential pages only in that section.

3. Use a generator plugin (self-hosted WordPress)

  1. Check your existing SEO or llms.txt plugin features before installing another plugin.
  2. Review the plugin’s settings for included post types, selected pages, visibility, SEO directives, and exclusions.
  3. Generate or refresh the file, then inspect the resulting public /llms.txt URL and compare it against the content you intend to expose.

The Website LLMs.txt plugin documents generation from published content and says it can respect settings from Yoast, Rank Math, SEOPress, and AIOSEO. It can exclude pages marked noindex or nofollow; its documentation says content anonymous visitors cannot read is omitted by default. Check post types and membership-protected content rather than assuming every plugin uses the same rules. See Website LLMs.txt in the WordPress plugin directory.

Yoast SEO documents a selective generator: it includes the five latest updated posts, pages, and custom post types; posts are included only when published in the last 12 months; cornerstone content is prioritized; manual page selection can override the page rule. Existing files can prevent automatic generation, so check for a physical llms.txt if expected output is missing. See Yoast’s llms.txt functional specification.

Project LLMs.txt documents both physical-file mode and a live endpoint served through WordPress rewrite rules for hosts that do not allow root writes. Its plugin listing specifies WordPress 6.4+, PHP 8.1+, and root write access for physical-file mode; verify the listing for current requirements before installing. See Project LLMs.txt in the WordPress plugin directory.

4. WordPress.com instructions

On WordPress.com, the built-in feature is available on Business and Commerce plans, and Business users must activate it. If you use the manual method, identify useful pages, write full URLs and short descriptions in a Markdown-formatted text file, connect over SFTP, and put the lowercase llms.txt file in the site root, called htdocs in the guide. Then visit the domain’s /llms.txt URL and confirm the text appears. Read WordPress.com’s guide.

5. Verify the published file

Request the exact public URL, not a dashboard preview. It should return your Markdown text rather than a 404, a redirect to the home page, or unrelated HTML. You can check it in a browser or with these commands:

curl -i https://example.com/llms.txt
python -c "import requests; r = requests.get('https://example.com/llms.txt', timeout=20); print(r.status_code, r.url, r.headers.get('content-type')); print(r.text[:2000])"
node -e "fetch('https://example.com/llms.txt').then(async r => console.log(r.status, r.url, r.headers.get('content-type'), (await r.text()).slice(0, 2000))).catch(console.error)"

Check the status code, final URL, response body, and content type. A plain-text or text-like response is appropriate; hosting configuration may label Markdown as text/plain or another text type. Confirm that links use full, correct URLs and that the content does not include private or unintended pages.

6. Troubleshooting

Symptom Likely cause Fix
/llms.txt returns 404 The file is not in the actual document root, the filename’s case is wrong, or a rewrite endpoint has not been refreshed. Confirm the host’s root directory and lowercase filename. For the Website LLMs.txt rewrite route, clear its cache or re-save permalinks under Settings → Permalinks.
The homepage or unrelated page appears A fallback rewrite or redirect handles the request instead of the file. Check the physical file and rewrite/plugin configuration; request the URL again and inspect the final URL and body.
A plugin creates no output An existing physical file may take precedence, or plugin selection rules may exclude all candidate content. Check for an existing llms.txt; inspect the plugin’s included post types, publication dates, manual selections, SEO flags, and exclusions.
Some posts or pages are missing The generator may intentionally select only recent, cornerstone, public, or explicitly selected content. Read its selection rules and add or select the missing pages where supported. For complete control, curate a manual file.
Protected content appears in output The generator’s visibility handling may not match your membership or access setup. Review every generated link and exclude content that anonymous visitors should not discover or access.
Changes do not appear A plugin, page cache, CDN, or browser may be serving an older response. Refresh the generator, clear the relevant cache, and request the exact URL again.

7. Maintenance, reliability, and expectations

A physical file is a small static resource, so serving it adds little work to WordPress. Its main reliability concern is keeping links accurate as pages move. A plugin generator can update from site content, but depends on its selection logic, WordPress routing where applicable, and caching. After changing plugins, permalinks, host configuration, or important URLs, verify the public endpoint again.

Keep the document curated and public. Treat it as an index and context aid, not an access-control mechanism: putting a URL in the file does not make a private page public, and omitting a URL does not block crawlers. Do not include credentials, private URLs, or details you would not publish. There is no guaranteed ranking, traffic, citation, or assistant-fetch outcome; the proposal and WordPress.com guide describe a format intended to help tools understand important content, while WordPress.com notes that AI systems do not all use it yet.

8. Capture a verified page with ScreenshotNeo

After publishing the file, you may want a visual record of the public page or other important site pages. ScreenshotNeo is a website screenshot API and MCP server. For this setup article, the commands below capture the rendered llms.txt URL if a browser-style visual capture is useful; the file itself is text, so use the verification commands above to inspect its contents. See the ScreenshotNeo API documentation.

Or skip the browser setup

One GET request returns an image or PDF from a URL. For a visual check of a WordPress page, adapt the URL to a rendered page on your site:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/about/ -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/about/"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/about/' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot; bot checks, blank pages, and failed loads are never billed; its MCP server lets AI agents take screenshots; and 1,000 screenshots per month are free with no card, with paid plans starting at $5 for 3,000. A screenshot cannot verify Markdown contents, so use it for the rendered pages linked from your file. Sign up free for 1,000 screenshots a month, no card required.

FAQ

Does llms.txt replace robots.txt or a sitemap?

No. It is a proposed overview and link list. A sitemap lists pages; robots.txt concerns automated access.

Can I put the file under a subdirectory?

The proposal allows a file at a subpath to describe content beneath that path. For a site-wide WordPress overview, the usual location is the root URL, /llms.txt.

Will every AI assistant read it?

No guarantee exists that a particular assistant will fetch or use the file. Treat it as a concise public guide to your most useful content.

Use a manually curated file, or a plugin that supports explicit selection and exclusions, then inspect the public output.