I just wonder is any chance to exclude custom plugin files from Wordpress plugin editor.

I don't want give access to couple files from my plugin form wp-admin users.

I try to use tips from link below, but i just don't know where put this code and first of all i think they do not solve my problem.

Exclude file from theme editor

1 Answer 1


Those constants are set in wp-config.php like

define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );

The first line disables file editing in the wp backend, whereas the second line disables plugin installation or deletion entirely.

If you want to disable editing of files from the backend only partly, you'd have to do it another way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.