How to Disable File Editing From WordPress Admin Dashboard?

By default, WordPress comes with two built-in editors that allow you to edit your WordPress theme and plugin files from your WordPress dashboard.

One editor is to edit theme files at Appearance > Theme Editor and another is to edit plugin files at Plugins > Plugin Editor.

Disabling them in the WordPress admin area is one of the WordPress security practices to counter the situation where someone gains access to the WordPress dashboard.

Here’s the code that you can use to disable file editing completely from your admin dashboard in WordPress. You need to add the following code in wp-config.php.

* Disable WordPress Theme and Plugin File Editing from WordPress Dashboard. 
define( 'DISALLOW_FILE_EDIT', true );

Leave a Reply

Your email address will not be published. Required fields are marked *