This guide explains how to disable file editing in WordPress Dashboard.
Let us follow the steps-
- Open your wp-config.php file in a text editor.
- Somewhere above the line in that file that states /* That’s all, stop editing! Happy blogging. */, add the line-
define( ‘DISALLOW_FILE_EDIT’, true );.
- Save this file.
- Check your WordPress dashboard; the links at “Appearance > Editor” and “Plugins > Editor” should not be there anymore (even on an Administrator account).
- FTP or another tool can be used to edit files in WordPress.
- This code prevents users from editing theme and plugin files directly from the WordPress dashboard for enhanced security.
That is it! Hope you liked our article. For more information, do visit our site regularly.