It's not recommended to use theme editor and plugin editor in WordPress admin panel

By default, it's possible edit your theme and plugin files in WordPress admin panel. But when you click Appearance > Editor, you will see a warning message.

It's not recommended that you edit your theme directly in the WordPress dashboard. If it's required, you might want to try making a child theme.

If you edit your theme inappropriately, your site will be broken. For example, when you enter illegal code to the theme's function file, you will see a  similar message as shown:

It's also not a good idea to edit your theme files via the dashboard in the terms of security. If your site is hacked, hackers might want to inject malicious codes to your theme files.

To disable theme editor and plugin editor in WordPress admin panel, please add the following line to your wp-config.php file:

define('DISALLOW_FILE_EDIT', true);

You can edit your theme or plugin files via FTP or using File Manager in cPanel (provided by webhosting companies such as Bluehost and Siteground.)

When you make a mistake while editing theme files, it's possible to roll it back to an earlier version by pressing Ctrl + Z.

Leave a Comment