Wp performance

From wpgaurav/WordPress-skills · View interactive version

Wp performance is an AI agent skill from the GitHub repository wpgaurav/WordPress-skills. 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.

How to use this skill

Skill file

From Agent Skills for WordPress. Copyright (C) 2026 WordPress Contributors, licensed under GPL-2.0-or-later. Changed from upstream: the compatibility: frontmatter line was dropped when this copy was made in March 2026, and license frontmatter plus this notice were added on 2026-10-24. See NOTICE.md.

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:

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.