WordPress allows you to quickly edit theme and plugin files from its admin panel. While WordPress checks if the edit is making any Fatal PHP error it wouldn’t save the file and show the error. But in case the wrong edit or modification is done on theme or plugin files there are chances website can go down.
When you are only person working on your website then its okay. But when more than 1 admins are working and they do not know PHP. Its better to disable the plugin and theme editor to avoid any problem.
How to disable Theme Editor and Plugin Editor
All you need to do is to disable the Theme Editor and the Plugin Editor. To do that, open your wp-config.php file and add the following code to it:
- Connect with FTP
- Download wp-config.php from root directory
- Edit wp-config.php in a text editor and make following changes.
- Re upload the wp-config.php after saving your changes.
- Or you can do this through cPanel going to File Manager
/** Disable File Editor **/
define( 'DISALLOW_FILE_EDIT', true );
You can post this constant code before the following line in wp-config.php
/* That's all, stop editing! Happy publishing. */
This is how you can disable theme editor and plugin editor in your WordPress website. The second line is extra security to avoid File modifications.
In case you want to stop add new plugin and add new theme. How to Disable Plugin and Theme Update and Installation on WordPress