Skip to main content
Login Join
Snippet · PHP

Turn Off WordPress File Editing

Shared by Nikul Valani · May 6, 2026

9 views
Back to Snippets

Disables the built-in WordPress theme and plugin editor to prevent unauthorized modification of PHP files from the dashboard. This function should be added to the wp-config.php file in the root directory of your WordPress installation.

define( 'DISALLOW_FILE_EDIT', true );