Skip to main content
< All Topics
Print

Set DISALLOW_FILE_EDIT to true

WARNING: Changing this setting writes to wp-config.php. Verify that the file is writable, that the site has a recovery path, and that configuration management or deployment tooling will not immediately overwrite the change.

Description of the control

This control sets the desired value of DISALLOW_FILE_EDIT in the wp-config Hardening section of the Core Hardening page. The same section also shows the detected wp-config.php path, current writability status, and a Check wp-config.php permissions button.

Use this control when the site should keep the DISALLOW_FILE_EDIT constant enabled 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 file status.
  4. Click Check wp-config.php permissions if you want to verify that the file can be updated.
  5. Select Set DISALLOW_FILE_EDIT to true.
  6. Click Save changes.

Validation

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

If needed, use Check wp-config.php permissions again and verify that the file is still accessible and that the control continues to show the expected saved state.

Table of Contents