Skip to content

Enable all eligible modules

POST
/wp-json/wp2/modules/v1/modules/enable-all
curl --request POST \
--url https://example.com/wp-json/wp2/modules/v1/modules/enable-all \
--header 'Content-Type: application/json' \
--header 'X-WP-Nonce: <X-WP-Nonce>' \
--data '{ "scope": "network" }'

ModulesManager::enable_all_modules(scope).

Media typeapplication/json
object
scope
string
default: network
Allowed values: network site

Bulk enable ok

Media typeapplication/json
object
scope
string
Allowed values: network site
enabled
boolean
Example
{
"scope": "network"
}

Insufficient capability

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}