All Security snippets
Security
Lock Down the Theme & Plugin File Editor
Turns off the built-in code editor under Appearance/Plugins in wp-admin, so nobody can edit theme or plugin files straight from the dashboard — a common target once an account gets compromised.
php
define( 'DISALLOW_FILE_EDIT', true );
Setup:
- Open
wp-config.phpin the root of your WordPress install. - Add the line above anywhere before the
/* That's all, stop editing! */comment. - Save the file — no need to touch anything else.