Disable WordPress Themes / Plugins Text Editor

Posted by Lasantha Bandara on September 27th, 2016 File Under : security, wordpress0 Comment

WordPress administrators can edit their themes and plugins files directly from the WordPress backend.

If you site URL is http://example.com/,

Themes Editor URL is: http://example.com/wp-admin/theme-editor.php

Plugins Editor URL is: http://example.com/wp-admin/plugin-editor.php

You can disable the code editor in the WP admin adding this PHP code into your wp-config.php file:

// Disable the themes / plugins editor in WP Admin
define('DISALLOW_FILE_EDIT', true);

For example, you can add it like this:

Disable the themes / plugins editor in WP Admin

Now someone try to visit to the theme editor or plugin editor he will see an message like this:

Themes Editor Access Block Message

File Under : security, wordpress

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.