Skip to content

How to Add llms.txt to WordPress: Standard, Bedrock, and Trellis Setups

By Jasper Frumau WordPress

AI assistants are reading your website right now. ChatGPT, Perplexity, Claude, and Gemini all crawl the web to answer user questions, and when they find a site that clearly explains what it does and what it covers, they are more likely to cite it. The problem: most websites make these AI systems guess. Your homepage might be obvious to a human visitor, but a language model pulling context from thousands of pages needs a structured summary it can parse in seconds.

That is what llms.txt solves. It is a plain Markdown file you place at your site root — like robots.txt but for AI. It tells language models who you are, what topics you cover, and which pages matter most. The spec was proposed in late 2024 and adoption is accelerating: as of mid-2026, thousands of sites have added one, and AI crawlers actively look for it. Most guides stop at “install a plugin.” This one shows you how to create and deploy llms.txt three ways — on a standard WordPress install, on a Bedrock setup, and through a version-controlled Trellis deploy — without depending on a plugin to generate it for you.

Quick summary: Create a Markdown file called llms.txt with your site description, key topics, and links to your most important pages. In standard WordPress, upload it to your root directory via FTP or file manager. In Bedrock, place it in web/ alongside index.php. If you deploy with Trellis, commit the file, push, and run trellis deploy. Verify at yourdomain.com/llms.txt.

What is llms.txt?

Think of robots.txt as instructions for search engine crawlers — it tells them where they can and cannot go. llms.txt does something different: it gives AI systems a concise, structured overview of your site so they can understand your content without crawling every page.

The format is plain Markdown with a predictable structure. You start with a heading and a short description, then add sections for your key topics and your most important pages. The entire file should fit in a single LLM context window — typically under 2,000 words. If you want to provide a more detailed version, the spec also supports llms-full.txt, but for most sites the base file is enough.

Here is a minimal example for a small business:

# Your Business Name

> One-sentence description of what you do.

## About

Two to three sentences about your business,
what you specialize in, and who you serve.

## Key Topics

- Topic one
- Topic two
- Topic three

## Important Pages

- [Services](https://example.com/services/)
- [About](https://example.com/about/)
- [Blog Post Title](https://example.com/blog/post-slug/)

## Contact

https://example.com/contact/

That is the entire file. No JSON, no schema markup, no build tools. If you can write a list in Markdown, you can create an llms.txt.

Why your WordPress site needs one

AI assistants decide what to recommend based on what they can understand quickly. When ChatGPT is answering “who offers WordPress speed optimization in Europe?”, it pulls from thousands of pages it has crawled or indexed. A site with a clear llms.txt saying “we specialize in WordPress speed optimization for SMEs in the US and Europe” gives the model an unambiguous signal. A site without one forces the model to infer your specialty from scattered page content — and it may guess wrong, or skip you entirely.

This matters more than you might expect. Studies of AI-generated answers show that language models heavily favor sites where they can quickly identify the topic, the author’s expertise, and the most relevant pages. A llms.txt hands them all three in a single file.

It also complements your existing SEO work rather than replacing it. Your structured data, meta descriptions, and heading hierarchy still matter for traditional search. llms.txt adds a parallel channel specifically for the AI layer that now sits in front of many searches.

What to include in your llms.txt

Keep it focused. The goal is not to replicate your sitemap — it is to give an AI system the context it needs to cite you accurately. Include:

  • Site identity: Your business name and a one-line description. Be specific — “WordPress speed optimization for SMEs” is better than “web development agency.”
  • About section: Two to three sentences covering what you do, who you serve, and what makes your approach different. This is the passage AI systems are most likely to pull into a recommendation.
  • Key topics: A bulleted list of your core areas. Use natural language, not keywords. “WooCommerce speed optimization” is better than “speed optimization WooCommerce fast.”
  • Important pages: Link to your 5-15 most important pages — services, key blog posts, case studies. Each link should include a descriptive anchor text. Skip tag pages, archives, and thin content.
  • Contact: A link to your contact page. Simple, but it signals legitimacy.

Update the file when you publish important new content. Unlike structured data that needs precise formatting, updating llms.txt is as simple as adding a line to a text file.

Adding llms.txt to standard WordPress

If you are running a standard WordPress installation — the kind you get from your hosting provider’s one-click installer — the file goes in your WordPress root directory, the same folder that contains wp-config.php and wp-content/.

Option 1: File manager or FTP

  1. Create a file called llms.txt on your computer using any text editor.
  2. Add your content following the Markdown structure shown above.
  3. Upload it to your WordPress root directory via FTP (FileZilla, Cyberduck) or your host’s file manager.
  4. Verify it loads at https://yourdomain.com/llms.txt.

That is it. No plugin needed, no database entry, no PHP. The file is served directly by your web server like any other static file.

Option 2: WP-CLI (if you have SSH access)

If you have SSH access to your server, you can create the file directly from the command line:

cd /path/to/your/wordpress
nano llms.txt

Paste your Markdown content, save, and visit the URL to confirm.

Option 3: Serve it dynamically with code (no file, no plugin)

Some managed hosts make it awkward to drop a static file in the web root, and on many WordPress installs there is no native way to serve a custom file at the domain root. If you would rather keep everything in code — and avoid a plugin — you can register a rewrite rule that serves llms.txt on the fly. Add this to a small must-use plugin (wp-content/mu-plugins/) or your theme’s functions.php:

add_action('init', function () {
    add_rewrite_rule('^llms\.txt$', 'index.php?llms_txt=1', 'top');
    add_rewrite_tag('%llms_txt%', '1');
});

add_action('template_redirect', function () {
    if (!get_query_var('llms_txt')) {
        return;
    }

    header('Content-Type: text/plain; charset=utf-8');

    echo "# Your Business Name\n\n";
    echo "> One-sentence description of what you do.\n\n";
    echo "## Important Pages\n\n";
    echo "- [Services](" . home_url('/services/') . ")\n";
    echo "- [About](" . home_url('/about/') . ")\n";

    exit;
});

After adding the rule, visit Settings → Permalinks and click Save Changes once to flush the rewrite rules, then load yourdomain.com/llms.txt to confirm. This route is handy when you want the file’s links to track your live pages, but for most sites a static file is simpler to read and edit — reach for code only when a static upload is not practical.

Adding llms.txt to a Bedrock installation

Bedrock restructures the WordPress directory layout for better security and dependency management. If you are using Bedrock, the file placement is different from a standard install — and putting it in the wrong directory is the most common mistake.

In Bedrock, the public web root is the web/ directory, not the project root. This is where index.php, wp-config.php, and the wp/ subdirectory live. Your llms.txt goes here:

your-project/
├── config/
├── vendor/
├── web/                    ← public web root
│   ├── app/
│   ├── wp/
│   ├── index.php
│   ├── robots.txt          ← already here
│   └── llms.txt            ← put it here
├── composer.json
└── .env

The key rule: llms.txt goes in the same directory as robots.txt. If you already have a robots.txt in web/, drop llms.txt right next to it. If you place it in the project root by mistake, it will not be publicly accessible because Nginx or Apache only serves files from web/.

Note: This applies to any Bedrock-based setup — whether you manage it with Trellis, deploy manually, or use a different deployment tool. The directory structure is a Bedrock convention, not a Trellis one.

Deploying with Trellis

If you use Trellis to manage your WordPress server and deployments, the workflow is version-controlled and repeatable. You never SSH into the server to manually create files — everything goes through git and Ansible.

Step 1: Add the file to your repo

Create llms.txt in your site’s web/ directory and commit it:

# From your project root (where composer.json lives)
cd web/
# Create llms.txt with your content (use any editor)
nano llms.txt

# Stage and commit
cd ..
git add web/llms.txt
git commit -m "Add llms.txt"
git push

Step 2: Deploy

Run a standard Trellis deploy from your project root:

trellis deploy production yourdomain.com

Trellis pulls the latest commit from your repo, runs Composer, creates a new release directory, and symlinks it as the current release. Your llms.txt is now live — no manual file uploads, no FTP, no SSH.

Step 3: Verify

curl -s https://yourdomain.com/llms.txt | head -5

You should see the first few lines of your Markdown file. If you get a 404, double-check that the file is in web/ and not in the project root.

If you are running multiple sites on the same Trellis server — say a main site and a second site using repo_subtree_path — each site needs its own llms.txt in its own web/ directory. Trellis deploys each site independently, so the file in Site A’s web root will not appear on Site B.

This is exactly how we added llms.txt to a second site we host on a shared Trellis server: the file went in that site’s own web/ directory, got committed alongside its robots.txt, and went live on the next trellis deploy — no manual uploads, and zero effect on the other site sharing the box.

Common mistakes to avoid

  • Wrong directory in Bedrock: Placing the file in the project root instead of web/. The project root is not publicly accessible — only web/ is served by the web server.
  • Including every page: The file should not be a second sitemap. List your 5-15 most important pages — the ones you want AI to cite. Tag archives, author pages, and date-based archives add noise without value.
  • Using HTML instead of Markdown: The spec calls for Markdown, not HTML. AI systems parse Markdown natively, and it keeps the file compact. Do not wrap content in <div> tags or use HTML links.
  • Setting it and forgetting it: When you publish an important new post or service page, add it to llms.txt. A stale file with links to content you published a year ago misses your best recent work.
  • Using a plugin when you do not need one: Several plugins now offer llms.txt generation. For most sites, a static text file is simpler, faster, and gives you full control over the content. Save the plugin for sites with hundreds of pages that change frequently.

What else helps AI systems cite you

A llms.txt file is one piece of the puzzle. For best results, pair it with:

  • An about page with real credentials: AI systems weight E-E-A-T (experience, expertise, authoritativeness, trustworthiness) heavily. An about page that explains who writes your content and why they are qualified is the single biggest authority signal most small sites are missing.
  • Article schema on blog posts: Use Article or BlogPosting structured data instead of generic WebPage. This gives AI systems author, date, and headline data in a format they can parse without guessing.
  • Definition blocks in your content: Open each post with a 40-60 word block that directly answers the core question. This is the passage AI systems extract most when generating answers.
  • FAQ sections: Add 3-5 natural-language Q&As to your key posts. ChatGPT and Perplexity pull heavily from FAQ-style content because the question-answer format maps directly to how users query them.
  • Open crawler access: Make sure your robots.txt does not block AI crawlers. Check that GPTBot, ClaudeBot, PerplexityBot, and Google-Extended are not disallowed — we analyzed which AI bots actually crawl WordPress sites and how much traffic they generate.

Frequently Asked Questions

  • Do I need a plugin to add llms.txt to WordPress? No. It is a static text file that goes in your web root directory. You can create it in any text editor and upload it via FTP, your host’s file manager, or the command line. Plugins exist but are unnecessary for most sites.
  • Where does llms.txt go in a Bedrock WordPress installation? In the web/ directory — the same folder that contains index.php and robots.txt. Do not place it in the project root, as that directory is not publicly accessible in Bedrock’s structure.
  • Is llms.txt the same as robots.txt? They serve different purposes. robots.txt tells crawlers where they can and cannot go on your site. llms.txt gives AI language models a structured summary of your site content so they can understand and cite you accurately. You should have both.
  • How often should I update llms.txt? Whenever you publish important new content — a major blog post, a new service page, or a case study you want AI systems to know about. For most small business sites, updating monthly or when key pages change is enough.
  • Will llms.txt help my Google rankings? Not directly. Google uses its own crawling and ranking systems. However, llms.txt helps with AI-generated answers in Google’s AI Overviews, ChatGPT, Perplexity, and other AI assistants. It is part of answer engine optimization (AEO), which runs parallel to traditional SEO.

Need a WordPress Developer?

We build, maintain, and troubleshoot WordPress sites for SMEs — custom theme development, plugin configuration, hosting setup, and ongoing hosting and support. Fixed-price quotes available.

  • Custom WordPress theme and plugin development
  • WordPress hosting setup and server configuration
  • Site migrations, updates, and troubleshooting
  • Ongoing hosting, updates, and on-call support

Leave a Reply

Your email address will not be published.