When creating a WordPress website for a client, you may wanna stop your client from editing plugin and theme files by disabling plugin and theme editors. By disabling the plugin and theme editor, one would have to edit the core files from the FTP client or file manager, which will be a tricky for a non-technical guy.
In last post, I shared a super-small snippet to disable plugin and theme updates, installations and editor. But what if you only want to disable the editor? Don’t worry, because WordPress has another super-small snippet for this job.
Just add following snippet to your wp-config.php file:
define( 'DISALLOW_FILE_EDIT', true );