In this guide, we show how you can disable file editing in WordPress admin by adding a line to your wp-config.php file. If you have used the 1-click installer, file edit is disabled by default.
When file editing is enabled, Administrator users can edit the code of themes and plugins directly from the WordPress dashboard. This is a potential security risk because not everyone has the skills to write code, and if a hacker breaks in, they would have access to all your data. That's why we recommend disabling it.
- Log into the one.com control panel.
- Open File Manager under Files & Security.
- Locate the file wp-config.php and check the box to select it.
- Click Edit in the menu bar at the top of your screen.
- Search wp-config for define('DISALLOW_FILE_EDIT', it is usually located towards the bottom.
- If you've found it, check it's set to "true" (see below). If it's not there, you need to add it to the bottom of the file, like this:
- Click Save at the top of your screen.
Tip: If you want to temporarily allow file editing, you can simply replace "true" with "false". Change it back when you are done editing.