WordPress Site Editor Not Loading or Missing
The Site Editor is built on the server first, then finished in the browser over the REST API. Each failure point shows a different symptom, and the symptom tells you where to look.
Quick check: the label under Appearance tells you whether the theme supports the Site Editor at all (Editor = yes, Design or Patterns = classic theme). If Editor is there but the screen fails, the stage where it fails tells you the cause, as the table below shows. For the post and page editor, see the block editor not working instead.
Editor, Design or Patterns: what the menu means
WordPress decides the menu item from the active theme:
| Appearance shows | Theme type | What opens |
|---|---|---|
| Editor | Block theme (has templates/index.html) |
The full Site Editor: templates, template parts, styles, navigation, pages |
| Design | Classic theme that supports editor-styles or ships a theme.json |
A limited Site Editor: Style Book and patterns, no templates |
| Patterns | Any other classic theme | The pattern library only |
Do not confuse the menu item with the sidebar heading: once the Site Editor of a block theme opens, its left panel is titled Design too (on a 7.1.5 test install with Twenty Twenty-Five the menu item read Editor and the panel Design).
So a missing Editor item is not a fault. You need a block theme, such as one from this list of free block themes. Widget areas and classic menus do not carry over, so stage the switch first.
If the menu item is missing entirely, the user lacks the edit_theme_options capability. Opening site-editor.php directly then shows You need a higher level of permission. with Sorry, you are not allowed to edit theme options on this site.
How the Site Editor loads
Two stages, and each fails in its own way:
- Server side.
site-editor.phpbuilds the editor settings and runs about twenty REST requests internally (templates, template parts, global styles, navigation, settings, block patterns) so their data is embedded in the page. These internal requests do not travel over HTTP, so a firewall rule on/wp-json/does not affect them. - Browser side. The
wp-edit-sitescript starts the app from that data. Everything after that point travels over HTTP to/wp-json/: opening a page, loading patterns, every save.
This explains a confusing symptom: a site with a blocked REST API often opens the Site Editor fine, then fails as soon as you click into something or save.
Symptom → check → cause → fix
| Symptom | Check | Likely cause | Fix |
|---|---|---|---|
| White page or "There has been a critical error on this website." when opening the editor | PHP error log | A PHP fatal during the server stage, often Allowed memory size … exhausted |
Raise the memory limit or fix the plugin named in the log |
| Full-screen editor stays empty, nothing renders | Browser console, first red error | wp-edit-site or a dependency failed to load or was altered |
Exclude wp-admin from JS optimisation and CDN rewriting |
| Editor opens, then spins or errors when you open a template or save | Network tab, requests to /wp-json/ |
REST API blocked over HTTP (401, 403, 404, HTML instead of JSON) | Unblock the REST API, fix rewrites |
| A panel says "The editor has encountered an unexpected error." | Copy error button on that panel | A script crashed inside that panel, usually a block or plugin | Disable the plugin whose file appears in the stack |
| "The requested page could not be found. Please check the URL." | The p= value in the address bar |
Old bookmark or a link to a screen your theme does not have | Open Appearance → Editor from the menu |
| "You attempted to edit an item that doesn't exist. Perhaps it was deleted?" | The postId in the URL |
The template or page was deleted | Go back to the list and open an existing item |
| Editor loads unstyled, theme colours and fonts missing | Debug log with WP_DEBUG on |
theme.json has a syntax error and was ignored |
Fix the JSON |
| Theme update did not change a template | Template list, look for an edited copy | An edited copy in the database overrides the file | Reset the template |
PHP fatal on the server side
The server stage loads all templates, parts, block definitions, patterns and global styles in one request, so sites with many pattern- and block-heavy plugins run out of memory here. Administrators get WP_MAX_MEMORY_LIMIT (256M by default) on this screen. If the log shows exhaustion at that figure, something is registering far too much, and raising the limit only delays the next failure.
If wp-admin itself is unusable, disable plugins over SFTP, then re-enable them one at a time.
Scripts that never start
The editor is full-screen, so a JavaScript failure leaves an empty page. The message "The site editor requires JavaScript. Please enable JavaScript in your browser settings." appears only when JavaScript is actually off.
Read the first console error. Errors saying wp.editSite or another wp.* object is undefined mean a script did not arrive intact. Usual sources:
- optimisation plugins that defer, combine or minify admin scripts;
- a CDN rewriting
/wp-includes/js/dist/URLs or serving stale copies after an update; - an ad blocker or privacy extension (test in a private window).
To get readable errors and rule out WordPress's own script concatenation, add this to wp-config.php temporarily:
define( 'SCRIPT_DEBUG', true );
define( 'CONCATENATE_SCRIPTS', false );
Remove both lines when you are done.
REST API blocked after the editor opens
In the Network tab, filter by wp-json and click the failing template. Common responses:
- 403 with
rest_cookie_invalid_nonce("Cookie check failed"): the nonce on the page is stale, typically because a page cache or proxy cached a wp-admin page. Exclude/wp-admin/from caching. - 401/403 from a security plugin or WAF: allow authenticated REST requests, including
POSTfor saves. - 404 or an HTML page:
/wp-json/rewrites are broken. If?rest_route=/wp/v2/typesworks where/wp-json/wp/v2/typesdoes not, fix permalinks.
Tools → Site Health reports "The REST API encountered an error" or "The REST API encountered an unexpected result" when its own test fails. That second case is covered in the REST API unexpected result guide.
Broken theme.json
A theme.json that is not valid JSON does not crash anything. WordPress discards it and carries on, so the editor and front end lose the theme's palette, fonts and layout. With WP_DEBUG on, the log contains a notice like:
wp_json_file_decode(): Error when decoding a JSON file at path /…/themes/your-theme/theme.json: Syntax error
Validate the file; a trailing comma is the usual culprit. The structure itself is explained in WordPress theme.json.
Edited templates hiding theme changes
A template you edited is saved as a wp_template post and wins over the theme file, even after the theme updates. In Appearance → Editor → Templates, open the template's actions and choose Reset. Confirm "Reset to default and clear all customizations?" and wait for the "Template reset." notice.

Verify
- Appearance → Editor opens with no console errors.
- Open a template and a template part. Both load, and the Network tab shows
200for/wp-json/requests. - Make a small change, save, and reload. The change persists.
Frequently asked
- Your theme is a classic theme. WordPress shows Editor only when the theme has templates/index.html. A classic theme that supports editor styles or ships a theme.json gets Design (Style Book and patterns); any other classic theme gets Patterns only.
- A JavaScript error inside one panel was caught and the panel was replaced with this message. Click Copy error and paste the stack somewhere readable: the file names in it usually point at the plugin or block script that threw.
- Yes. Theme templates are HTML files in the theme's templates and parts folders. Edited copies are stored as wp_template and wp_template_part posts and take priority over the files, so a broken edited copy can be reset from the template list or removed in the database.