How to disable file editing in WordPress Dashboard

September 13, 2023 / WordPress

This guide explains how to disable file editing in WordPress Dashboard.

Let us follow the steps-

  1. Open your wp-config.php file in a text editor.
  2. Somewhere above the line in that file that states /* That’s all, stop editing! Happy blogging. */, add the line-
    define( ‘DISALLOW_FILE_EDIT’, true );.
  3. Save this file.
  4. Check your WordPress dashboard; the links at “Appearance > Editor” and “Plugins > Editor” should not be there anymore (even on an Administrator account).
  5. FTP or another tool can be used to edit files in WordPress.
  6. 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.


Spread the love