sites

Update File Modification Settings

Sets or removes a wp-config file-modification constant for a site. When ‘enabled’ is true the constant is defined as ‘true’ in the site’s wp-config.php; when false the constant is removed. Removing an already-absent constant succeeds, so the disable path is idempotent.

put/sites/{site_id}/file-modifications

Request

Path parameters

site_idinteger required

Request body

constantstring
enabledboolean

Response

Successful Response

messagestring
dataobject

Example response

{
  "message": "DISALLOW_FILE_EDIT enabled",
  "data": {
    "disallow_file_edit": true,
    "disallow_file_mods": false
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.