Skip to main content
Performance API endpoints were added in v1.9.0.
Base path: /wp-json/wp-manager-pro/v1/performance All endpoints require X-WP-Nonce header with a wp_rest nonce and the manage_options capability.

GET /performance/overview

Returns a comprehensive performance overview: object cache status, database stats, transient counts, and cache hit ratios.
curl https://example.com/wp-json/wp-manager-pro/v1/performance/overview \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

object_cache
object
Object cache status.
transients
object
db_stats
object

GET /performance/transients

Returns a paginated list of stored transients.
curl "https://example.com/wp-json/wp-manager-pro/v1/performance/transients?search=woocommerce&page=1" \
  -H "X-WP-Nonce: YOUR_NONCE"

Parameters

Filter by transient name substring.
page
integer
Page number. Defaults to 1.

Response

transients
array
Array of transient objects.
total
integer
Total matching transients.
total_pages
integer
Total pages.

DELETE /performance/transients

Delete a specific transient by name.
curl -X DELETE https://example.com/wp-json/wp-manager-pro/v1/performance/transients \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"name": "woocommerce_cart_hash_12345"}'

Parameters

name
string
required
The transient key (without _transient_ prefix) to delete.

Response

success
boolean
Always true on success.

POST /performance/transients/purge-expired

Deletes all expired transients from the database.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/performance/transients/purge-expired \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

success
boolean
Always true on success.
deleted
integer
Number of expired transients removed.

POST /performance/cleanup

Runs one or more database cleanup operations.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/performance/cleanup \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"types": ["revisions", "spam_comments", "orphaned_postmeta"]}'

Parameters

types
array
required
Array of cleanup types to run. Accepted values:
  • revisions — delete all post revisions
  • auto_drafts — delete auto-draft posts
  • spam_comments — delete spam comments
  • trash_comments — delete trashed comments
  • orphaned_postmeta — delete post meta rows with no matching post
  • orphaned_usermeta — delete user meta rows with no matching user
  • orphaned_termmeta — delete term meta rows with no matching term
  • orphaned_commentmeta — delete comment meta rows with no matching comment

Response

results
object
Object where each key is a cleanup type and the value is the number of rows deleted.

GET /performance/object-cache

Returns detailed object cache diagnostics and live statistics (Redis or Memcached).
curl https://example.com/wp-json/wp-manager-pro/v1/performance/object-cache \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

active
boolean
Whether object caching is active.
type
string
Cache driver (redis, memcached, external, or default).
connected
boolean
Whether the connection to the cache server is live.
host
string
Cache server host.
port
integer
Cache server port.
stats
object
Live cache statistics (driver-specific).
wp_stats
object
WordPress object cache stats for the current request (groups, hits, misses).
diagnostics
string
Raw diagnostic text output.
drop_in_exists
boolean
Whether wp-content/object-cache.php exists.
drop_in_valid
boolean
Whether the drop-in is a recognised Redis/Memcached implementation.

POST /performance/object-cache/flush

Flushes all keys from the object cache.
Flushing the object cache will temporarily increase database load as WordPress rebuilds cached values on the next requests.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/performance/object-cache/flush \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

success
boolean
Always true on success.

POST /performance/object-cache/drop-in

Installs, updates, or removes the Redis object cache drop-in file at wp-content/object-cache.php.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/performance/object-cache/drop-in \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"action": "install"}'

Parameters

action
string
required
One of:
  • install — copy the bundled Redis drop-in to wp-content/object-cache.php
  • update — replace an existing drop-in with the bundled version
  • remove — delete wp-content/object-cache.php

Response

success
boolean
Always true on success.
message
string
Confirmation message describing the action taken.

Build docs developers (and LLMs) love