Agent Skill · WordPress

wp-performance

Use when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor via REST headers), database/query optimization, autoloaded options, object caching, cron, HTTP API calls, and safe verification.

Provider: WordPress Path in repo: skills/wp-performance/SKILL.md

Skill body

WP Performance (backend-only)

When to use

Use this skill when:

This skill assumes the agent cannot use a browser UI. Prefer WP-CLI, logs, and HTTP requests.

Inputs required

Procedure

0) Guardrails: measure first, avoid risky ops

  1. Confirm whether you may run write operations (plugin installs, config changes, cache flush).
  2. Pick a reproducible target (URL or REST route) and capture a baseline:
    • TTFB/time with curl if possible
    • WP-CLI profiling if available

Read:

1) Generate a backend-only performance report (deterministic)

Run:

This detects:

2) Fast wins: run diagnostics before deep profiling

If you have WP-CLI access, prefer:

It catches common production foot-guns (autoload bloat, SAVEQUERIES/WP_DEBUG, plugin counts, updates).

Read:

3) Deep profiling (no browser required)

Preferred order:

  1. wp profile stage to see where time goes (bootstrap/main_query/template).
  2. wp profile hook (optionally with --url=) to find slow hooks/callbacks.
  3. wp profile eval for targeted code paths.

Read:

4) Query Monitor (backend-only usage)

Query Monitor is normally UI-driven, but it can be used headlessly via REST API response headers and _envelope responses:

Read:

5) Fix by category (choose the dominant bottleneck)

Use the profile output to pick one primary bottleneck category:

6) Verify (repeat the same measurement)

WordPress 6.9 performance improvements

Be aware of these 6.9 changes when profiling:

On-demand CSS for classic themes:

Block themes with no render-blocking resources:

Inline CSS limit increased:

Reference: https://make.wordpress.org/core/2025/11/18/wordpress-6-9-frontend-performance-field-guide/

Verification

Failure modes / debugging

Escalation

Skill frontmatter

compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Backend-only agent; prefers WP-CLI (doctor/profile) when available.