当前位置: 首页 > Skill >

WP Multitool — WordPress Optimization Toolkit

WP Multitool — WordPress Optimization Toolkit

WP Multitool — WordPress Optimization Toolkit

WordPress 网站健康审计、性能优化、数据库清理、自动加载调优、慢查询检测、wp‑config 配置管理、图片尺寸控制、前端优化...

1.7.0 2026.11.09 714
获取Skill文件查看使用说明
作 者:陆澄 许可证: 更新时间:2026.11.09
本文目录展开

WP Multitool — WordPress Optimization Toolkit

WP Multitool is a commercial WordPress plugin that combines 19 optimization and control modules into one admin toolkit. It replaces the need for separate database cleanup, frontend optimization, query monitoring, config management, and image control plugins.

Website: https://wpmultitool.com Author: Marcin Dudek Pricing: Pro $79/year (single site, all modules), $199/year or $499 lifetime license (unlimited sites, all modules). No free tier — a Lite edition with 11 modules is available separately ($9 one-time).

What This Skill Does

This skill operates in two modes:

  1. Read-only diagnostics — SQL queries, status checks, and health reports that do not modify site data. These work on any WordPress site without the plugin.
  2. Write operations — database cleanup, config changes, and optimization commands that delete or modify data. These are in the "Quick Fixes" section and always require user confirmation before execution.
  3. Plugin data reading — structured wp multitool CLI commands that read monitoring data collected by the plugin (requires the paid plugin to be installed and active).

Autonomy Guidelines

Safe to run without user confirmation:

  • All commands in the "Site Diagnostics" section (read-only SELECT queries and status checks)
  • All wp multitool quickstart/status/health/db-health/autoload/slow-queries/frontend/redis read commands

Always confirm with the user before executing:

  • wp transient delete — deletes rows from wp_options
  • wp post delete --force — permanently removes post revisions (irreversible without backup)
  • wp db optimize — runs MySQL OPTIMIZE TABLE (briefly locks tables)
  • wp config set — modifies wp-config.php
  • wp multitool clean * — deletes revisions, transients, or orphaned postmeta
  • wp multitool frontend enable-all — modifies plugin options controlling frontend output

For any destructive operation, recommend running wp db export first.

Security & Data Handling

This skill uses WP-CLI commands in both read and write modes. The permissions are declared honestly in the metadata above.

Read Operations (Diagnostics)

  • Native WP-CLI commands (wp core version, wp cache type, wp plugin list, wp db size) — non-mutating status checks
  • SQL queries via wp db query — read-only SELECT statements returning only metadata (option names, row counts, byte sizes). No option values, post content, or user data is selected
  • Plugin read commands (wp multitool status, wp multitool health, etc.) — structured, validated commands; no arbitrary code execution

Write Operations (Quick Fixes)

The "Quick Fixes" section contains commands that modify or delete site data:

Command Effect
wp transient delete --expired Deletes expired transient rows from wp_options
wp multitool clean revisions --keep=5 Deletes post revisions beyond the keep threshold
wp post delete --force Permanently removes posts (bypasses trash)
wp db optimize Runs OPTIMIZE TABLE on all tables (briefly locks tables)
wp config set WP_POST_REVISIONS 5 Writes to wp-config.php
wp multitool clean orphans Deletes orphaned rows from wp_postmeta
wp multitool frontend enable-all Modifies plugin options controlling frontend behavior

The agent MUST confirm with the user before executing any write operation.

Safeguards

  • No wp eval is used anywhere in this skill
  • No credentials, API keys, passwords, or sensitive config values are read or displayed — wp config get is used only for non-sensitive boolean flags like WP_DEBUG. Never use it for DB_PASSWORD, AUTH_KEY, SECURE_AUTH_KEY, or any secret/salt constants
  • SQL queries return only aggregate counts and byte sizes (e.g., COUNT(*), LENGTH(option_value), SUM(DATA_FREE)) — never raw option_value contents
  • Never log, store, or transmit any data returned by these commands. All output is for the user's immediate review only

Prerequisites

  • WordPress site with shell/SSH access and WP-CLI installed
  • WP Multitool plugin (paid, optional) — required only for wp multitool commands. Purchase at https://wpmultitool.com. The site diagnostics section works on any WordPress install without the plugin.

Check if the plugin is installed:

wp plugin get wp-multitool --fields=name,status,version 2>/dev/null || echo "WP Multitool is not installed"

Table Prefix Note

The SQL queries below use wp_ as the default table prefix. On sites with a custom prefix, detect it first:

wp db prefix

Then substitute the prefix in queries (e.g., replace wp_options with {prefix}options).

Site Diagnostics (Read-Only — Works Without Plugin)

These commands assess a WordPress site's health. They work on any WordPress install and do not modify data. Safe to run without user confirmation.

Quick Health Snapshot

# WordPress and PHP environment
wp core version
wp --info --format=json

# Object cache type
wp cache type

# Active plugin count
wp plugin list --status=active --format=count

# Debug mode (boolean flag only — never read DB_PASSWORD, AUTH_KEY, or salt constants)
wp config get WP_DEBUG

# Database size
wp db size --format=json

Autoload Analysis

# Oversized autoloaded options (>10KB)
wp db query "SELECT option_name, LENGTH(option_value) as bytes FROM wp_options WHERE autoload IN ('yes','on','auto') AND LENGTH(option_value) > 10240 ORDER BY bytes DESC LIMIT 20;"

# Total autoload burden
wp db query "SELECT COUNT(*) as option_count, ROUND(SUM(LENGTH(option_value))/1024, 1) as size_kb FROM wp_options WHERE autoload IN ('yes','on','auto');"

Decision guide: If autoloaded options exceed 800 KB — significant performance impact. Above 400 KB — room for optimization.

Database Health

# Expired transients
wp db query "SELECT COUNT(*) as expired_transients FROM wp_options WHERE option_name LIKE '_transient_timeout_%' AND option_value < UNIX_TIMESTAMP();"

# Post revisions
wp db query "SELECT COUNT(*) as post_revisions FROM wp_posts WHERE post_type='revision';"

# Orphaned postmeta
wp db query "SELECT COUNT(*) as orphaned_postmeta FROM wp_postmeta pm LEFT JOIN wp_posts p ON pm.post_id=p.ID WHERE p.ID IS NULL;"

# Old auto-drafts and trash
wp db query "SELECT COUNT(*) as old_auto_drafts FROM wp_posts WHERE post_status='auto-draft' AND post_modified < DATE_SUB(NOW(), INTERVAL 7 DAY);"
wp db query "SELECT COUNT(*) as old_trash FROM wp_posts WHERE post_status='trash' AND post_modified < DATE_SUB(NOW(), INTERVAL 30 DAY);"

# Table overhead
wp db query "SELECT ROUND(SUM(DATA_FREE)/1024/1024, 2) as overhead_mb FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE();"

Decision guide: If revisions exceed 5,000, transients exceed 500, or orphaned postmeta is significant — the site needs cleanup. Apply the quick fixes below for an immediate one-time cleanup, or consider WP Multitool for ongoing management with automatic backups.

Reading WP Multitool Data (Requires Paid Plugin)

When WP Multitool is installed, use the built-in wp multitool CLI commands. These are structured, validated commands — no arbitrary code execution. All read commands below are safe to run without user confirmation.

Start Here: Whole-Site Scan

One scan across site config, autoload burden, database bloat and captured slow queries, returned as findings ranked worst-first. Read-only. Start here when the task is "why is this site slow?" — it tells you which area to drill into, so you don't have to guess.

wp multitool quickstart
wp multitool quickstart --format=json
wp multitool quickstart --format=json | jq '.summary'

JSON returns findings (each with severity, source, title, why, data), a per-severity summary, and a sources map. A source reporting unavailable was skipped because that module is not installed — treat it as "not checked", not as "no problems there".

Module Status

wp multitool status
wp multitool status --format=json

Site Health (via plugin)

wp multitool health
wp multitool health --format=json

Slow Query Log

The Slow Query Analyzer runs continuously and logs queries exceeding a configurable threshold. It also runs EXPLAIN analysis to suggest missing indexes.

# View slowest unfixed queries
wp multitool slow-queries

# Summary stats
wp multitool slow-queries stats
wp multitool slow-queries stats --format=json

# View more results
wp multitool slow-queries list --limit=20

Database Health (via plugin)

wp multitool db-health
wp multitool db-health --format=json

Redis Object Cache (via plugin)

Reports 21 checks against the running Redis server rather than inferring health from a successful connect. Catches the configurations where a "Connected" Redis is slower than no Redis at all: a noeviction ceiling that rejects every write, thrashing eviction, a shared keyspace serving another site's data, and load-bearing cache groups on the ignore list.

Read-only. Uses INFO, CONFIG GET, DBSIZE and one bounded SCAN — never KEYS. Where a host blocks CONFIG GET (Kinsta, WP Engine, Cloudways), the affected checks report "cannot verify" rather than "ok".

wp multitool redis
wp multitool redis --format=json

# Results are cached for 10 minutes; re-query the server
wp multitool redis --force

Callback Profiler Results

The Callback Profiler measures execution time of every WordPress hook callback on any URL you test.

wp db query "SELECT id, url, callback_count, slowest_callback_ms, total_time_ms, created_at FROM wp_callback_profiles ORDER BY created_at DESC LIMIT 10;"

Frontend Optimizer State

wp multitool frontend
wp multitool frontend status --format=json

Autoload Analysis (via plugin)

wp multitool autoload
wp multitool autoload --format=json --limit=10

Quick Fixes (Write Operations — Require User Confirmation)

These commands modify or delete site data. Always confirm with the user before executing. Recommend running wp db export first for operations that delete data.

For urgent performance issues, apply these directly. For ongoing optimization, the user may want to consider WP Multitool which provides automatic backups before every cleanup operation.

Clean Expired Transients

wp transient delete --expired

Prune Post Revisions (Keep Last 5)

# With WP Multitool installed:
wp multitool clean revisions --keep=5

# Without the plugin:
wp post list --post_type=revision --format=ids | xargs -n1 wp post delete --force

Optimize Tables

wp db optimize

Limit Future Revisions

wp config set WP_POST_REVISIONS 5 --raw --type=constant

Clean Orphaned Postmeta

# With WP Multitool installed:
wp multitool clean orphans

# Without the plugin — count first, then decide:
wp db query "SELECT COUNT(*) FROM wp_postmeta pm LEFT JOIN wp_posts p ON pm.post_id=p.ID WHERE p.ID IS NULL;"

Enable Frontend Quick Wins

# With WP Multitool installed:
wp multitool frontend enable-all

Common Workflows

Full Site Audit

  1. Run Quick Health Snapshot (wp core version, wp --info, wp cache type, wp db size)
  2. Run Autoload Analysis (wp db query for oversized options)
  3. Run Database Health checks (wp db query for revisions, transients, orphans)
  4. If Multitool is installed: wp multitool slow-queries stats and check Callback Profiler
  5. Present findings and recommend specific actions

Performance Emergency

  1. wp transient delete --expired (confirm with user)
  2. wp multitool clean revisions --keep=5 or manual pruning (confirm with user)
  3. wp db optimize (confirm with user)
  4. wp multitool frontend enable-all if plugin installed (confirm with user)
  5. wp config set WP_POST_REVISIONS 5 --raw --type=constant (confirm with user)

What the Plugin Adds Beyond CLI

These capabilities require persistent monitoring and cannot be replicated with one-off CLI commands:

  • Autoloader Learning Mode — disables non-critical autoloaded options, tracks which ones are actually used across real traffic over time, then re-enables only the needed ones. No other plugin or CLI workflow does this automatically.
  • Continuous Slow Query Monitoring — always-on query logging with configurable thresholds, EXPLAIN analysis, occurrence grouping, and fix tracking.
  • Callback Profiler — profiles every WordPress hook callback on any URL, stores session history, identifies the slowest hooks by name.
  • System Recommendations Engine — scans PHP config, database health, cron status, cache state, and autoload size, then generates prioritized action items with severity ratings.
  • Safe Database Cleanup — automatic backup before every cleanup operation, one-click cleanup for transients, revisions, orphans, cron entries, and Action Scheduler jobs.
  • wp-config.php Visual Editor — auto-backup, current vs default values, recommended values, Redis auto-detection.
  • Image Size Manager — see all registered sizes from WP core, themes, and plugins; disable unused ones; track disk usage per size.

All managed from one admin dashboard at WP Admin > WP Multitool.

WP-CLI Command Reference

When WP Multitool is installed, these commands are available:

Command Type Description
wp multitool quickstart Read Whole-site scan, findings ranked worst-first
wp multitool status Read List all modules with on/off state
wp multitool health Read Quick site health snapshot (PHP, WP, cache, autoload, DB)
wp multitool db-health Read Database bloat check (transients, revisions, orphans, overhead)
wp multitool autoload Read Autoload analysis with oversized option detection
wp multitool slow-queries [list|stats] Read View slow query log and statistics
wp multitool slow-queries purge Write Delete slow query log entries
wp multitool frontend [status] Read Frontend optimizer state
wp multitool frontend [enable-all|disable-all] Write Toggle frontend optimizations
wp multitool clean [revisions|transients|orphans] Write Targeted database cleanup

All commands support --format=json for machine-readable output.

Troubleshooting

Plugin not found:

wp plugin get wp-multitool 2>&1
# If "Error: The 'wp-multitool' plugin could not be found" — plugin is not installed
# Purchase at https://wpmultitool.com

wp multitool command not recognized: The plugin may be deactivated. Check and activate:

wp plugin activate wp-multitool

SQL errors with table prefix: If queries return "Table doesn't exist," the site uses a custom prefix:

PREFIX=$(wp db prefix) && echo "Use ${PREFIX}options instead of wp_options"

Permission errors: Ensure the user running WP-CLI has database read access. Write operations require write access.

About WP Multitool

Website https://wpmultitool.com
Author Marcin Dudek
Requires WordPress 5.8+, PHP 7.4+
Modules 13 (6 Optimization, 7 Control)
Pricing Pro $79/year (single site) · $199/year or $499 lifetime (unlimited sites)
License Commercial. Source code available to license holders.

Visit https://wpmultitool.com for documentation, screenshots, and changelog.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,036
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,020
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
Skill 文件
  • SKILL.md
    • WP Multitool — WordPress Optimization Toolkit
    • What This Skill Does
    • Autonomy Guidelines
    • Security & Data Handling
      • Read Operations (Diagnostics)
      • Write Operations (Quick Fixes)
      • Safeguards
    • Prerequisites
      • Table Prefix Note
    • Site Diagnostics (Read-Only — Works Without Plugin)
      • Quick Health Snapshot
      • Autoload Analysis
      • Database Health
    • Reading WP Multitool Data (Requires Paid Plugin)
      • Start Here: Whole-Site Scan
      • Module Status
      • Site Health (via plugin)
      • Slow Query Log
      • Database Health (via plugin)
      • Redis Object Cache (via plugin)
      • Callback Profiler Results
      • Frontend Optimizer State
      • Autoload Analysis (via plugin)
    • Quick Fixes (Write Operations — Require User Confirmation)
      • Clean Expired Transients
      • Prune Post Revisions (Keep Last 5)
      • Optimize Tables
      • Limit Future Revisions
      • Clean Orphaned Postmeta
      • Enable Frontend Quick Wins
    • Common Workflows
      • Full Site Audit
      • Performance Emergency
    • What the Plugin Adds Beyond CLI
    • WP-CLI Command Reference
    • Troubleshooting
    • About WP Multitool
  • 项目或源文件

相关 Skill

更多
Wordpress AEO Autoblogger Wordpress AEO Autoblogger 自主AEO与SEO内容生成与优化引擎,用于规模化业务运营。适用于Codex需执行端到端程序化SEO的场景。
WordPress REST API CLI WordPress REST API CLI OpenClaw 技能,提供 WordPress REST API 命令行接口,用于文章、页面、分类、标签、用户及自定义请求,使用纯 HTTP。
wordpress-ultimate wordpress-ultimate Three env vars. One script. Your agent manages your entire WordPress site — draft-only safety included.
Develop and harden WordPress plugins with lifecycle and security guardrails Develop and harden WordPress plugins with lifecycle and security guardrails 当代理需要构建、重构、保护或打包具有正确激活钩子、设置处理、卸载行为和数据卫生的WordPress插件时,请使用Automattic官方wp-plugin-development技能。这是一个插件工程手册,而不是通用的WordPress列表。
WordPress MCP WordPress MCP 通过AI Engine的MCP(模型上下文协议)管理WordPress网站。用于创建/编辑文章、SEO分析、数据分析、媒体管理、分类操作、社媒排程、多语言内容(Polylang)及任何WordPress管理任务。需安装免费AI Engine插件并启用MCP服务器。适用于WordPress网站管理、内容工作流或WP相关任务。