Why the Theme File Editor Is Missing in WordPress
It is almost never a bug. Something disabled it deliberately — and in most cases that was the right call.
Updated 29 August 2026
If Appearance → Theme File Editor has vanished, one of four things is true. Work through them in this order.
1. File editing is disabled in wp-config.php
The most common cause. Look for either of these lines:
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );
The first hides the theme and plugin editors. The second is stronger — it also removes the ability to install or update plugins and themes from the dashboard.
Managed hosts set these by default, and many security plugins add them on activation. To re-enable temporarily, change true to false or comment the line out.
2. A security plugin is hiding it
Wordfence, iThemes Security, Solid Security and others offer a "disable file editing" toggle. Check the plugin's settings rather than editing wp-config.php — if you edit the file while the plugin keeps rewriting it, you will go in circles.
3. You are on a block theme
Block themes replace the classic editor menu with Appearance → Editor, the Site Editor. The old file editor is not the tool for those themes; templates are edited visually and stored in the database. This is not something to fix — it is a different, better workflow for that theme type.
4. Your user role lacks the capability
Editing theme files needs the edit_themes capability, which only Administrators have on a single site. On multisite it is restricted to Super Admins, and the editor is hidden for everyone else regardless of configuration.
Should you turn it back on?
Honestly, usually not. The built-in editor has real problems:
- A syntax error takes the whole site down instantly. There is no staging step and no undo.
- Your changes are overwritten by the next theme update, unless you are editing a child theme.
- If an attacker gets one admin session, the editor is a direct path to running arbitrary PHP on your server. That is precisely why hosts disable it.
Better alternatives, in rough order of preference:
- Additional CSS in the Customiser, for styling.
- A code-snippets plugin for PHP additions. Most validate syntax before saving and can roll back a fatal snippet.
- A child theme edited over SFTP, for template changes.
- A proper local or staging environment for anything substantial.
If you do enable it temporarily
- Take a backup first.
- Copy the file's contents into a text editor before changing anything, so you can paste it back.
- Make one small change at a time and reload the site after each.
- Keep SFTP access open in another window — if you white-screen the site, that is the only way back in.
- Set
DISALLOW_FILE_EDITback totruewhen you are done.
Common questions
Where is the plugin file editor?
Tools → Plugin File Editor, and it is governed by the same DISALLOW_FILE_EDIT constant. If one is hidden, both are.
I removed the constant and it is still missing.
A security plugin is probably re-adding it, or your host defines it at the server level where wp-config cannot override it. Check the plugin settings first, then ask your host.