Skip to main content

GET /plugins

Returns all installed plugins with their status, version, and update availability.
curl -X GET https://example.com/wp-json/wp-manager-pro/v1/plugins \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

plugins
array
Array of plugin objects.
total
integer
Total number of installed plugins.

POST /plugins/activate

Activates an installed plugin.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/activate \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"plugin": "woocommerce/woocommerce.php"}'

Parameters

plugin
string
required
Plugin file path relative to the plugins directory (e.g. woocommerce/woocommerce.php).

Response

success
boolean
Always true on success.
message
string
Human-readable confirmation message.

POST /plugins/deactivate

Deactivates an active plugin. WP Manager Pro cannot deactivate itself.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/deactivate \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"plugin": "woocommerce/woocommerce.php"}'

Parameters

plugin
string
required
Plugin file path relative to the plugins directory.

DELETE /plugins/delete

Deactivates and permanently deletes a plugin. WP Manager Pro cannot delete itself.
curl -X DELETE https://example.com/wp-json/wp-manager-pro/v1/plugins/delete \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"plugin": "hello-dolly/hello.php"}'

Parameters

plugin
string
required
Plugin file path relative to the plugins directory.

POST /plugins/install

Installs a plugin from the WordPress.org repository by slug.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/install \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "woocommerce"}'

Parameters

slug
string
required
WordPress.org plugin slug (e.g. woocommerce).

GET /plugins/search

Searches the WordPress.org plugin repository.
curl -X GET "https://example.com/wp-json/wp-manager-pro/v1/plugins/search?q=woocommerce&page=1" \
  -H "X-WP-Nonce: YOUR_NONCE"

Parameters

q
string
required
Search query string.
page
integer
Page number for paginated results. Defaults to 1. Returns 12 results per page.

Response

plugins
array
Array of matching plugin objects from WordPress.org.
total
integer
Total number of matching results.
pages
integer
Total number of result pages.

POST /plugins/upload

Installs a plugin from an uploaded ZIP file.
This endpoint requires multipart/form-data encoding. The file field must be named file and contain a valid .zip archive.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/upload \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -F "file=@/path/to/my-plugin.zip" \
  -F "overwrite=1"

Parameters

file
file
required
The plugin ZIP file to upload. Must have a .zip extension.
overwrite
boolean
If true, overwrites an existing plugin with the same slug. Defaults to false.

POST /plugins/export

Creates a ZIP archive of an installed plugin and returns a time-limited download URL. The URL expires after 5 minutes.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/export \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"plugin": "my-plugin/my-plugin.php"}'

Parameters

plugin
string
required
Plugin file path relative to the plugins directory.

Response

success
boolean
Always true on success.
download_url
string
Time-limited URL to download the ZIP file. Valid for 5 minutes.
filename
string
Suggested filename for the download.

GET /plugins/download

Streams a previously exported plugin ZIP file. Use the download_url returned by POST /plugins/export.

Parameters

key
string
required
The one-time download key returned from POST /plugins/export.

POST /plugins/update

Updates an installed plugin to its latest available version from WordPress.org. Returns a 400 error if no update is available.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/update \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"plugin": "woocommerce/woocommerce.php"}'

Parameters

plugin
string
required
Plugin file path relative to the plugins directory.

POST /plugins/install-version

Installs a specific version of a WordPress.org plugin, overwriting any currently installed version. If the plugin was active before the install, it is reactivated automatically.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/plugins/install-version \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "woocommerce", "version": "8.5.0"}'

Parameters

slug
string
required
WordPress.org plugin slug.
version
string
required
The exact version to install (e.g. 8.5.0). Must match the format x.y.z.

Build docs developers (and LLMs) love