How many times have you handed over a project to a client, only to receive a phone call two weeks later saying “I think I broke the site…”?

Maybe your client used the theme file editor that is built in to the WordPress admin pages, without having a clue about what they were doing. Sure, you can upload the theme again, but it would probably be better for all concerned if you could simply prevent your clients accessing the theme file editor in the first place.

Well, you can. I don’t think this is a widely known trick, but it’s certainly an easy one.

In a site’s wp-config.php file, insert the following line:

define('DISALLOW_FILE_EDIT', true);

I usually put it just above the line that says “That’s all, stop editing! Happy blogging.”

As soon as you upload the updated wp-config.php file to the site, the “Editor” option will no longer be shown in the “Appearance” section of the WordPress admin menu.

Share Button