How to disable themes and plugins in the WordPress editor is something that website managers need to know to ensure security and reduce errors when editing code.
One of the most used features by hackers is the editor function provided on the WordPress admin dashboard, to change/insert codes that aim to damage/steal website data.
To disable the editor, simply insert the code into your wp-config.php file, and the editor will no longer work.
- Login to cPanel and open the File Manager, or via FTP and go to the root of your hosted website.
- Open and edit the wp-config.php file in public_html, enter the line of code:
define( 'DISALLOW_FILE_EDIT', true );
You can remove the code when you want to use the editor facility.
3. After that, click Save to save the changes
Untuk memastikan hasilnya, silakan login ke Dashboard lalu lihat di menu Theme dan Plugins. Jika berhasil, maka Anda akan melihat perbedaan dengan hilangnya submenu untuk akses editor. Nah, apabila Anda ingin mengembalikan akses ke fitur tersebut, cukup hapus kode tadi dari file wp-config.php.