Turn off the theme and plugin file editors
Removes the code editors under Appearance and Plugins, so a stolen admin login can’t be used to write PHP into your theme or plugin files.
<?php
// The same as adding define( 'DISALLOW_FILE_EDIT', true ); to wp-config.php.
if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
define( 'DISALLOW_FILE_EDIT', true );
}
In these packs
- Harden WordPress: Close the doors attackers try first: XML-RPC, user name discovery, the file editors, revealing login errors.