Rank Math SEO WP Writer
Rank Math SEO 文章撰寫工具
Rank Math test rules · Valid HowTo / FAQ blocks · Pre-publish verifier
English · 正體中文 · 日本語 · 한국어
This is an unofficial community project. It is not made by, endorsed by, or affiliated with Rank Math or its makers. Rank Math SEO is third-party software and is not included here.
What it does
Turns "write me a WordPress article" into an article that passes Rank Math's own tests and scores 80+, without guessing at Rank Math's rules.
| Area | What you get |
|---|
| Rank Math rules | 25 Rank Math tests and score rules with points, thresholds and KB links, read from the source of seo-by-rank-math 1.0.282 |
| Blocks | HowTo and FAQ markup that matches each block's save(), so the editor never shows "invalid content" |
| Verifier | Counts words and density the way Rank Math does; any failed check exits with exit code 1 |
| Lookup | Chinese or English questions answered from data/, each with its source |
| Publishing | Clipboard block paste (no server access) or WP-CLI on your own server |
| Tools | Every CLI as a Python and a Node twin, standard library only, installer for 8 AI platforms |
Rules read from the plugin
python scripts/search.py "密度"
# [tests] keywordDensity ... <0.5 fail 0; ... up to 2.5 best 6; >2.5 fail 0
# trust=官方原始碼 source=analyzer.js keywordDensity calculateScore (1.0.282)
Pre-publish verifier
rankmath-verify article.html "Focus Keyword" # or: python tools/verify-article.py
Block paste, no SSH
rankmath-export article.html # whole article to the clipboard
rankmath-export article.html --only faq # just the FAQ block
Block fixers
python tools/regenerate-faq.py article.html # rebuild FAQ HTML from its JSON
python tools/fix-howto-block.py 101 --dry # preview a HowTo fix on post 101
Problems it fixes
| Problem | Fix in this skill |
|---|
| Density too high or too low | Plugin scoring bands in data/focus-keyword-density.csv; the verifier counts like the plugin |
| HowTo or FAQ block shows "invalid content" | HTML must equal the block's save(); fix-howto-block and regenerate-faq rebuild it |
JSON-LD <script> printed as text | Use the rank-math blocks; the verifier flags inline ld+json |
| "Your SEO title doesn't contain a number" | Title template [FK] 完整教學:N 大功能 |
--post_content="$(cat …)" fails, Windows writes \r\n | Pass the file to wp post update; every tool writes LF |
| No SSH access to the server | rankmath-export copies paste-ready blocks |
When to use
| Use it for | Use something else for |
|---|
| Writing, fixing or publishing posts on a WordPress site that runs Rank Math SEO | Other block-editor pages → gutenberg-headless |
| Tutorials, guides and blog posts with HowTo and FAQ blocks, in Traditional Chinese or any language | Elementor or Mosaic pages → elementor-headless, mosaic-headless |
| Repairing HowTo / FAQ blocks the editor marks as invalid | Sites on Yoast or another SEO plugin (different tests) |
Install
| Need | For |
|---|
| Python 3.9+ or Node.js 18+ | The tools (standard library only) |
ssh, and WP-CLI on your server | Publishing or batch-fixing posts over WP-CLI only |
| Windows, macOS or Linux | Everything |
Step 1: Pick an install method