How to add an llms.txt file in WordPress with Yoast SEO

Adding an llms.txt file to WordPress does not necessarily require custom development or a manually maintained text file. In one AI/GEO optimization review, the site already used Yoast SEO, which could generate and serve /llms.txt directly from WordPress.

The developer recommended using Yoast’s built-in feature rather than creating a separate static file. Editors could enable the file themselves, choose between automatic and manual page selection, and update the included content later without a code deployment. For this site, manual selection was recommended so the file would emphasize cornerstone content instead of automatically surfacing recently edited or less representative pages. The source task documents this recommendation and setup guidance, but not that the feature was ultimately enabled.

Issue background

The site owner was exploring llms.txt as part of an AI and geographic optimization strategy.

The main questions were:

  • Does WordPress require anything more than serving a static text file?
  • Where should llms.txt live?
  • Can editors update it later without a developer?
  • Are there technical best practices to consider?

The expected public location was the domain root:

/llms.txt

The client had not yet finalized the content and wanted to understand the implementation options before proceeding.

Diagnosis

The developer reviewed the site and confirmed that Yoast SEO was already installed.

That meant the site did not need a custom plugin, theme change, or hand-written static file simply to expose /llms.txt.

Yoast could handle the file directly from WordPress and provide two content-management approaches:

  • Automatic mode, where Yoast generates the file and refreshes its selected content periodically.
  • Manual page selection, where editors choose the pages that should appear.

The developer recommended manual mode for this site because automatic selection could surface recently edited pages, location pages, or other content that did not best represent the brand’s core positioning.

Resolution steps

The documented setup guidance was:

  1. Open Yoast SEO settings. In WordPress admin, go to Yoast SEO → Settings → Site features.
  2. Find the AI tools section. Locate the llms.txt feature under Yoast’s AI-related site features.
  3. Enable llms.txt. Turn the feature on and save the settings.
  4. Use the site root as the public location. Once enabled, Yoast serves the file at:
https://example.com/llms.txt
  1. Prefer manual page selection for tighter control. Open the customization controls and switch from automatic selection to manual selection.
  2. Add cornerstone pages. The developer recommended selecting pages that clearly communicate who the organization helps, its services, geographic relevance, case studies, and contact information.
  3. Save and preview the generated file. Visit /llms.txt publicly and confirm that the selected content accurately represents the site.
  4. Let editors maintain the file in WordPress. Once configured, pages can be added or removed from the same Yoast settings screen without requiring a deployment.
  5. Keep Yoast SEO updated. Because the file is generated by Yoast, normal plugin maintenance remains part of keeping the feature available and compatible.

The developer also noted that Yoast can generate a default llms.txt automatically. The site owner therefore did not need to hand-write a file before the feature could work.

Final outcome

The technical review concluded that no custom development was required for this WordPress site.

Because Yoast SEO was already installed, the recommended solution was to enable its built-in llms.txt feature and manage the included pages directly from WordPress. Manual page selection was preferred so the file could focus on the site’s most important brand, service, geographic, case-study, and contact content.

The task was closed after those instructions were provided. The source thread does not document that llms.txt was actually enabled on the live site, so this should be treated as an implementation recommendation rather than a completed deployment.

The broader lesson is that llms.txt does not need to become another custom-maintained file if the site’s SEO tooling already supports it. Using Yoast keeps the file at the correct root URL, gives editors control over the content, and avoids unnecessary development overhead.

If you want to add llms.txt to WordPress or review which pages should be included for AI/GEO optimization, contact Freshy. Our WordPress team can review the existing SEO stack and recommend the simplest maintainable setup.