If you have multiple administrators on your website and you don’t want to allow them to change the theme’s files and plugin’s file then you have to disable theme and plugin editor. You can do this with a simple one-line of code added into the wp-config.php file.
To disable the theme and plugin editor,
- First, open the wp-config.php file in your editor
- Then find this comment line “That’s all, stop editing! Happy publishing.“
define( 'DISALLOW_FILE_EDIT', true );
Copy this code and place the just before that comment line- Save the wp-config.php file
After saving it, you can check theme and plugin editor are disabled now not visible on the admin side under Appearance and Plugins option