ad

How to Disable File Editing in WordPress

Disable File Editing in WordPress

WordPress comes with a built-in code editor that allows users to edit theme and plugin files directly from the WordPress admin area. It is a plain code editor that lets you make changes in theme or plugins at the code level. Theme Editor is located in Appearance -> Theme Editor and Plugin Editor can be found in Plugins -> Plugin Editor.

Whenever you try to access these sections for the first time, WordPress also warns that using the editor can break your website if you do something wrong.

Disable File Editing in WordPress

If you are not good at coding, making the wrong change will break your website. The good thing is that the latest editors can now catch most of the fatal errors and revert back the changes.

The built-in file editor gives full access to the theme and plugin code. If you are do not want this section to appear in your WordPress admin area, you can simply disable it. There is no native option to enable or disable this. you to edit WordPress configuration file to disable the file editor in WordPress.

Disable Theme and Plugin Editors in WordPress

You need to simply add a one-line code in a wp-config.php file located at the root of your WordPress installation. To get access to this file, you can either use FTP or file manager of your hosting panel.

Just add the following code before the line saying, ‘That’s all, stop editing! Happy publishing.’

define( 'DISALLOW_FILE_EDIT', true );

Then save the wp-config.php file.

Now the plugin and theme editors will not appear in the WordPress admin area.

Wrap Up

WordPress is built on PHP. If you want to do changes in themes or plugins, you need to know PHP properly. If you or other people managing the website are not good in PHP, it is a good idea to disable the file editing in WordPress.

I hope this article was useful. If you have any questions, you can ask using the comments.

Nord VPN Sale

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.


Similar Articles

0 Comments

Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip Developed By Deepanker