Skip to main content
FolksSpeakersPluginsThemesEventsSnippetsShippedCommunityResources
Login Join
Snippet · PHP

Disable Theme Or Plugin Editor In WP Admin

Shared by Meet Makadia · April 29, 2026

12 views
Back to Snippets

How to implement

1. Locate the file wp-config.php in the base directory of your WordPress directory.
2. Open the file in a text editor.
3. Past the code above to the end of this file.
4. Save and close.

define( 'DISALLOW_FILE_EDIT', true );