Skip to content
PageAudit

Audit a WordPress site's SEO with PageAudit

Check that search engines can see the site, then audit the latest posts and pages with WP-CLI. No plugin needed.

Updated

1Let search engines see the site

In Settings, Reading, clear Discourage search engines from indexing this site. When it is on, every page says noindex.

2Audit the latest pages

On the server, run the loop in the WordPress folder. It audits the 10 latest posts and pages: the free audits of one network for a day.

wp post list --post_type=page,post --post_status=publish \
  --posts_per_page=10 --field=url |
while read -r url; do
  curl -sS -X POST https://pageaudit.online/api/audit -o report.json \
    -H 'content-type: application/json' -d "{\"url\": \"$url\"}"
  python3 -c '
import json, sys
report = json.load(open("report.json"))
counts = report.get("counts")
if counts:
    print(sys.argv[1], "score", report["score"], "errors", counts["errors"])
else:
    print(sys.argv[1], report.get("message") or report.get("error"))
' "$url"
done

3Fix the errors

Open a page with errors in PageAudit to see the evidence and the suggested change. Titles and descriptions usually live in your SEO plugin or theme.