How To Disable File Editing In WordPress And Secure Your Website

Last modified on March 9, 2019 28 sec read

Normally using WordPress’s editor, we can easily edit the theme and plugin’s files. Here’s the screenshot of the editor.

Disable File Editing in WordPress

It’s best to disable the theme and plugin editors. To keep secure our website we need to disable this tool.

How to Disable

First, login to your CPanel. Open file manager. Or, you can use FTP client. You can use FileZilla – The free FTP solution.

Once you connected with FTP, go to the root of your website’s directory. If there is a wp-config.php file, edit the file.

Now write the following code:

define( 'DISALLOW_FILE_EDIT', true );

Before closing, don’t forget to save the wp-config.php file.

Read all security tips and tricks about WordPress: The Powerful WordPress Security Guideline – Simple Tricks

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development.