Enable all eligible modules
POST
/wp-json/wp2/modules/v1/modules/enable-all
const url = 'https://example.com/wp-json/wp2/modules/v1/modules/enable-all';const options = { method: 'POST', headers: {'X-WP-Nonce': '<X-WP-Nonce>', 'Content-Type': 'application/json'}, body: '{"scope":"network"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
scope
string
Responses
Section titled “Responses”Bulk enable ok
Media typeapplication/json
object
scope
string
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": {}}