Auto AI Optimization
An automatic llms.txt and .md page generator plugin for WordPress.
by Kaan KOSE (@kaankosei) · github.com/kaankosei/auto-ai-optimization · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kaankosei/auto-ai-optimization/archive/refs/heads/main.zipA modern, highly-optimized WordPress plugin that prepares your website for AI scrapers, LLMs (Language Models), and AI Agents. It serves two main purposes:
- Generates a fully spec-compliant
/llms.txtfile outlining your website architecture. - Automatically adds
.mdendpoints to every post and page on your site, serving clean Markdown instead of HTML.
Features
- Global
/llms.txtEndpoint: Follows the Jeremy Howard specification for AI-friendly website maps. Groups content by categories, auto-prunes old content to anOptionalblock. - Dynamic Markdown Pages: Any post or page (e.g.,
your-site.com/hello-world/) automatically gets an AI-readable Markdown version atyour-site.com/hello-world.md. - Intelligent HTML-to-MD Parser: The built-in converter parses headers, bold text, links, lists, code blocks, and blockquotes while intelligently stripping messy shortcodes, scripts, and unnecessary div wrappers.
- Aggressive Caching: Uses WordPress transients to cache all endpoints so your server performance is never impacted by heavy AI scrapers. Cache auto-clears on post updates.
- Advanced Admin UI: A beautiful, React-like settings interface using native WordPress UI to toggle endpoints, test outputs, and debug Markdown generation for specific posts.
Installation
- Copy the
auto-ai-optimizationfolder into yourwp-content/plugins/directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Upon activation, the plugin automatically flushes rewrite rules.
- Navigate to Settings > Auto AI Opt to configure options.
- Your global map is live at
/llms.txt. - Append
.mdto any post permalink to see its markdown version!
Technical Details
- Output: All endpoints return
Content-Type: text/plain; charset=utf-8withX-Robots-Tag: noindex. - Rewrite System: Hooks into
template_redirectnatively to prevent full theme loads when.mdis requested, drastically improving scraper performance. - Requirements: PHP 7.4+, WordPress 5.8+
Author
Created by Kaan KOSE (@kaankosei)