Skip to main content
Dev Tools API endpoints were added in v2.4.0.
Base path: /wp-json/wp-manager-pro/v1/dev-tools All endpoints require X-WP-Nonce header with a wp_rest nonce and the manage_options capability.

GET /dev-tools/wp-config

Returns all parsed define() constants from wp-config.php, grouped by category.
curl https://example.com/wp-json/wp-manager-pro/v1/dev-tools/wp-config \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

groups
object
Object with keys database, debug, salts, urls, memory, custom. Each key contains an array of constant objects.
writable
boolean
Whether wp-config.php is writable by the web server.
path
string
Resolved file path to wp-config.php.
size
integer
File size in bytes.

POST /dev-tools/wp-config

Update or add a define() constant in wp-config.php.
This endpoint modifies wp-config.php directly. Incorrect values (especially for DB_* constants) can make your site inaccessible.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/dev-tools/wp-config \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"name": "WP_DEBUG", "value": "true"}'

Parameters

name
string
required
Constant name to update or create.
value
string
required
New raw value string. Strings should be quoted (e.g. "'my-value'"), booleans unquoted (true/false).

Response

success
boolean
Always true on success.

GET /dev-tools/htaccess

Returns the content of the root .htaccess file.
curl https://example.com/wp-json/wp-manager-pro/v1/dev-tools/htaccess \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

content
string
Full .htaccess file content.
exists
boolean
Whether the file exists.
writable
boolean
Whether the file is writable.
size
integer
File size in bytes.
path
string
Resolved file path.

POST /dev-tools/htaccess

Write new content to .htaccess.
An invalid .htaccess causes a 500 Internal Server Error. Test changes on staging first.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/dev-tools/htaccess \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"content": "# BEGIN WordPress\n..."}'

Parameters

content
string
required
Full new .htaccess content to write.

Response

success
boolean
Always true on success.

GET /dev-tools/phpinfo

Returns parsed PHP configuration grouped by extension/module.
curl https://example.com/wp-json/wp-manager-pro/v1/dev-tools/phpinfo \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

sections
array
Array of section objects.
php_version
string
PHP version string.

GET /dev-tools/query-monitor

Returns database queries captured during the request. Requires SAVEQUERIES to be true in wp-config.php.
curl https://example.com/wp-json/wp-manager-pro/v1/dev-tools/query-monitor \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

Returns an array of query objects:
sql
string
The SQL query string.
time
number
Execution time in seconds.
caller
string
PHP function/method that triggered the query.
slow
boolean
true if the query took longer than 0.05 seconds.

GET /dev-tools/environment

Returns server environment variables available via $_SERVER and PHP environment.
curl https://example.com/wp-json/wp-manager-pro/v1/dev-tools/environment \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

Returns an object where each key is an environment variable name and the value is its string value.

POST /dev-tools/environment

Update a runtime environment setting (where supported by the server configuration).
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/dev-tools/environment \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"key": "MY_VAR", "value": "my_value"}'

Parameters

key
string
required
Environment variable name.
value
string
required
New value to set via putenv().

Response

success
boolean
Always true on success.

Build docs developers (and LLMs) love