Skip to main content
< All Topics
Print

Set DISALLOW_FILE_MODS to true

WARNING: Enabling this setting can prevent WordPress from installing, updating, or modifying plugins, themes, and other files through normal admin workflows. Confirm how the site handles updates and deployments before enabling it.

Description of the control

This control sets the desired value of DISALLOW_FILE_MODS in the wp-config Hardening section of the Core Hardening page. It is presented as a single checkbox labeled Set DISALLOW_FILE_MODS to true.

Use this control when WordPress file modification actions should be disabled through the DISALLOW_FILE_MODS constant in wp-config.php.

Procedure

  1. In WordPress admin, open Posture Management.
  2. Select Core Hardening.
  3. In the wp-config Hardening section, review the detected wp-config.php path and current file status.
  4. Click Check wp-config.php permissions if you need to verify writability.
  5. Select Set DISALLOW_FILE_MODS to true.
  6. Click Save changes.

Validation

After saving, reload Posture Management -> Core Hardening and confirm that Set DISALLOW_FILE_MODS to true remains selected.

Then verify that the site’s expected update and deployment process still aligns with this setting.

Table of Contents