WordPress GEO 优化
让你的 WordPress 内容站或 WooCommerce 商店被 AI 搜索引擎准确收录。将 llms.txt 放在 wp-config.php 同级根目录,用 Yoast / Rank Math 放行 AI 爬虫,并用 WPCode 稳定输出 JSON-LD。
立即审计你的 WordPress 站点
输入 WordPress 或 WooCommerce 域名,检测 AI 可爬性、llms.txt、结构化数据与 E-E-A-T 信号:
查看样例报告 — n8n.io 得分 66/100(Basic),11 个维度中 8 个超过 60%。
1. 在 WordPress 根目录(wp-config.php 同级)放置 llms.txt
不需要安装额外插件。通过 SFTP、SSH 或服务器面板的文件管理器,将 UTF-8 编码的 llms.txt 上传到与 wp-config.php 相同的网站根目录即可。
# Your WordPress Site
> 网站定位、核心栏目或 WooCommerce 商品目录简介。
## Core Pages
- [About](https://yourwpsite.com/about/): 团队背景与编辑规范
- [Shop](https://yourwpsite.com/shop/): 全部商品目录
- [Guides](https://yourwpsite.com/blog/): 深度评测与选购指南 2. 通过 Yoast SEO / Rank Math 配置 AI 爬虫 robots.txt
如果根目录没有物理文件,WordPress 会由 SEO 插件接管虚拟 robots.txt 输出:
- ✓Yoast SEO:进入
Yoast SEO > Tools > File editor编辑。 - ✓Rank Math:进入
Rank Math > General Settings > Edit robots.txt编辑。
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: GPTBot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Google-Extended
Allow: /
Sitemap: https://yourwpsite.com/sitemap_index.xml 3. 使用 WPCode 注入 JSON-LD 并补全 WooCommerce Product Schema
安装 WPCode(Code Snippets > Header & Footer),安全注入 Organization 与 Person 结构化数据,避免主题更新丢失代码。若站点使用 WooCommerce,请确认商品页完整输出 Product Schema 的 offers(价格、币种、库存)及 sku / gtin。
需要 WordPress / WooCommerce 一站式修复代做?
选择 $49 AI Visibility Fix Pack —— 交付可直接放入根目录的 llms.txt、robots.txt 诊断、主力商品的完整 Product JSON-LD,以及部署后 48 小时内复检对比报告。
WordPress GEO 常见问题
WordPress 网站的 llms.txt 应该放在哪个目录?
通过 SFTP、SSH 或主机文件管理器,将 llms.txt 直接上传到 WordPress 网站根目录(与 wp-config.php 同级目录),无需额外插件即可让 https://yourdomain.com/llms.txt 返回 HTTP 200 纯文本。
如何在 Yoast SEO 或 Rank Math 中为 AI 爬虫配置 robots.txt?
在 Yoast SEO 中进入 Tools > File editor 编辑 robots.txt;在 Rank Math 中进入 General Settings > Edit robots.txt。添加 GPTBot、OAI-SearchBot、ClaudeBot、PerplexityBot 和 Google-Extended 的 Allow: / 规则,并检查 Wordfence 或 Cloudflare WAF 是否误拦截。
如何在 WordPress 安全注入 JSON-LD 与 WooCommerce Product Schema?
使用 WPCode 插件(Code Snippets > Header & Footer)注入 Organization 或 FAQPage JSON-LD,避免主题更新覆盖修改。若使用 WooCommerce,请检查商品页是否正确输出含价格、币种、库存及 sku/gtin 的 Product Schema。
为什么安装了 SEO 插件后 WordPress 仍可能在 AI 审计中失分?
常见原因包括安全插件或 CDN Bot Fight Mode 对 AI 爬虫返回 403、缺少根目录 llms.txt、以及 WooCommerce 商品缺少标识符或变体报价。运行一次实时审计可以立刻定位这些问题。