SR
Get Started

Installation & Setup

Learn how to install and set up the LLMify Craft CMS plugin.


Requirements

  • Craft CMS 5.0.0 or later
  • PHP 8.2 or later

AI-Assisted Setup

If you use Claude Code or other AI tools, LLMify ships with a built-in setup skill. To use it paste this markdown into .claude/skills/install-llmify/SKILL.md.

.claude/skills/install-llmify/SKILL.md
---
name: install-llmify
description: Install and configure the LLMify Craft CMS plugin step by step
---

# Install and Configure LLMify for Craft CMS

This guide tells an AI agent how to install and set up the LLMify plugin in a Craft CMS 5 project.

## Step 1: Install the Plugin

Run the following commands in the Craft project root:

```bash
composer require samuelreichor/craft-llmify
php craft plugin/install llmify
```

If the project uses DDEV:

```bash
ddev composer require samuelreichor/craft-llmify
ddev craft plugin/install llmify
```

## Step 2: Enable Sections

1. In the Craft control panel, go to **LLMify → Content**.
2. Enable each section that should produce markdown output using the `Enable for Section` toggle.
3. Set an **LLM Title** and **LLM Description** for each enabled section. These populate the `llms.txt` file.

## Step 3: Add Template Tags

Wrap the content you want converted to markdown with the `{% llmify %}` tag in your Twig templates:

```twig
{% llmify %}
  <h1>{{ entry.title }}</h1>
  <div>{{ entry.bodyContent }}</div>
{% endllmify %}
```

Multiple `{% llmify %}` blocks per template are supported. Their content is merged into a single markdown file.

To exclude specific parts within an llmify block:

```twig
{% llmify %}
  <h1>{{ entry.title }}</h1>
  {% excludeLlmify %}
    <nav>...</nav>
  {% endexcludeLlmify %}
  <div>{{ entry.bodyContent }}</div>
{% endllmify %}
```

You can also exclude content by adding the `exclude-llmify` CSS class to any HTML element. This class name is configurable via the config file.

## Step 4: Check the Dashboard

Markdown is rendered on the first request of a page and cached, so nothing has to be generated upfront. Go to **LLMify → Dashboard** to see an overview of your setup:

- **Site setup score**: shows how complete your site-level configuration is (LLM title, description, note, front matter fields).
- **Cache**: how many pages are cached, and the pages whose markdown could not be rendered, with the reason.
- **Section statistics**: content-level stats per section.

To cache every page upfront, e.g. after a deployment:

```bash
php craft llmify/markdown/generate
```

To clear the markdown cache:

```bash
php craft clear-caches/llmify
```

## Step 5: Verify the Output

Verify these URLs are accessible:

- `/llms.txt`: Summary file listing all enabled entries
- `/.well-known/llms.txt`: RFC 8615 compliant discovery endpoint
- `/{entry-uri}.md`: Individual markdown page, homepage at `/index.md` (prefixed with `markdownUrlPrefix` if set, e.g. `/raw/{entry-uri}.md`)

Test auto-serve markdown with:

```bash
curl -H "Accept: text/markdown" https://your-site.com/your-entry-url
```

## Full Documentation

For detailed configuration options and advanced usage, see the [LLMify documentation](https://samuelreichor.at/libraries/craft-llmify).

Then just run /install-llmify in your Craft project directory and the assistant will do the development setup for you. You just need to adjust the content settings for your needs.

Craft Plugin Store

To install LLMify, go to the Plugin Store in your Craft control panel, search for "LLMify," and click the Install button.

Composer

ddev composer require samuelreichor/craft-llmify &&
ddev craft plugin/install llmify

Setup

Enable Sections

In the Craft control panel, go to LLMify > Content and enable each section that should produce Markdown output using the Enable for Section toggle.

Set an LLM Title and LLM Description for each enabled section, these populate the llms.txt file.

Note

Learn more about Content Settings in the Basic Overview.

Add Template Tags

Wrap the content you want converted to Markdown with the {% llmify %} tag in your Twig templates:

{% llmify %}
  <h1>{{ entry.title }}</h1>
  <div>{{ entry.bodyContent }}</div>
{% endllmify %}

Multiple {% llmify %} blocks per template are supported, their content is merged into a single Markdown file.

Note

Learn more about template tags and other content control options on the Content Control page.

Verify the Output

These URLs should now be accessible on your site:

  • /llms.txt and /.well-known/llms.txt: list of all URLs with descriptions
  • /{your-uri}.md: Markdown for a single entry, /index.md for the homepage

You can also test auto-serve and bot detection:

curl -H "Accept: text/markdown" https://your-site.com/your-entry-url

Add AI Bot Analytics (Optional)

Want to see which AI crawlers actually hit your Markdown, how often, and which pages they read? Install Craft Insights alongside LLMify and a dedicated dashboard appears in the Insights subnav.

Note

The integration activates automatically when both plugins are installed. See the AI Bot Analytics page for the full setup.

You're all set. Head over to the Basic Overview to learn about the Dashboard, Permissions, and other features.

Upgrading from 1.x

LLMify 2.0 no longer generates Markdown with queue jobs and stores it in the database. It renders the Markdown of a page on its first request and keeps it in Craft's data cache, invalidated by Craft's element cache tags. See How Caching Works for the details. The requirements stay the same.

Measured on a production Craft site with SEOmatic and Formie (running locally, 20 pages, 5 runs each), time to first byte in milliseconds, median with p95 in brackets:

1.x2.0Change
.md, not cached410 (p95 809)255 (p95 482)about 38 % faster
.md, cached101 (p95 142)45 (p95 46)more than twice as fast
Content negotiation287 (p95 606)44 (p95 45)about 6 times as fast
HTML page213 (p95 302)189 (p95 275)unchanged

The HTML page shows that serving Markdown adds no cost to normal page requests.

Update the Plugin

ddev composer require samuelreichor/craft-llmify:^2.0 &&
ddev craft up

The migrations drop the llmify_pages table and the llms-full.txt settings. Your site, content and plugin settings are kept. All Markdown is rendered again on the next request of each page.

Remove llms-full.txt

llms-full.txt was removed in 2.0. /llms-full.txt now returns a 404 and the llms-full-txt API endpoint is gone.

  • Remove links to llms-full.txt, e.g. from robots.txt or a headless front end that re-serves it.
  • Remove frontMatterInFullTxt from config/llmify.php, it has no effect anymore.

Update Custom Code

If your modules or plugins used LLMify's PHP API, replace these:

Removed in 2.0Use instead
Llmify::getInstance()->refresh (RefreshService)Llmify::getInstance()->markdown->getPageMarkdown($element)
RefreshMarkdownJob queue jobNothing, Markdown is rendered on demand
X-Llmify-Refresh-Request headerNothing, LLMify no longer requests your pages to generate Markdown
llmify_pages tablegetPageMarkdown(), the Markdown only lives in the cache

Also remove the X-Llmify-Refresh-Request header from server configs or cache exclusions (e.g. Blitz or CDN rules) that referenced it.

Check Your Templates

Markdown is now rendered from the section's template inside the request that asks for it. While it renders, the template sees the public page as an anonymous visitor: its own URL, no logged-in user, no query string, no cookies and a neutral User-Agent.

  • Content that depends on the current user, query parameters or cookies does not end up in the Markdown.
  • Pages whose route a module changes to a controller action cannot be rendered. The Dashboard lists them with the reason.

In headless mode nothing changes for your templates: the front end is fetched on the first request of a page instead of by a queue job.

Review the Cache Setup

  • Cache duration: Markdown stays cached for at most cacheDuration seconds, 86400 by default.
  • Clearing Craft's caches (e.g. php craft clear-caches/all in a deploy script) now also clears the Markdown. It is rendered again on the next request.
  • Load-balanced setups need a shared cache component like Redis, the same as for Craft's {% cache %} tags. Otherwise a change only invalidates the Markdown on the server that saved it.
  • basicAuthUsername and basicAuthPassword are only used for warming the cache now. Serving Markdown does not request your site anymore.

Warm the Cache (Optional)

Nothing has to be generated upfront anymore. Cron jobs that run llmify/markdown/generate keep working, they now cache every page that is not cached yet. Keep them if you want every page to be fast from the first request, otherwise remove them. See Console Commands.

The permissions Generate Markdown and Clear Markdown are now called Warm Markdown Cache and Clear Markdown Cache. Their handles did not change, so user groups keep them.

Support

If you encounter bugs or have feature requests, please submit an issue. Your feedback helps improve the plugin!


Copyright © 2026 Samuel Reichör