A block editor that opens to a white pane while the front end and the rest of wp-admin behave normally is one of the few WordPress failures that names its own cause if you ask it. Open the browser’s developer console before you change a setting, a limit or a plugin: the editor is a JavaScript application, and an application that never mounts almost always prints a red error naming the file that stopped it. Six causes cover nearly every real case — a script error aborting the editor bundle, a REST API that is unreachable or answers with something other than clean JSON, wp-json blocked by a security plugin or a hosting firewall, a plugin script colliding with wp.element, PHP memory exhausted partway through the admin request, and a siteurl or home value that sends the editor’s own requests somewhere the browser will not follow. Checked in that order, the diagnosis usually takes five minutes.
What you’ll accomplish
- Read the Console and the Network tab well enough to name the failing stage instead of guessing at it.
- Separate a JavaScript failure from a REST failure — identical on screen, unrelated underneath.
- Confirm
/wp-json/returns parseable JSON with no PHP notice or byte order mark printed in front of it. - Bisect plugins and themes on a staging copy without taking a live site apart.
- Rule out PHP memory exhaustion and a mismatched
siteurl/homepair, the two causes that leave the console clean.
Prerequisites
- WordPress 5.0 or later — any version that ships the block editor. Commands here were checked against 6.4 and later, where the editor’s data calls sit under the
wp/v2namespace. - An administrator account, and ideally shell access with WP-CLI 2.x. Confirm with
wp --info. - A browser with developer tools. Chrome, Firefox and Safari all expose the two panels this article uses: Console and Network.
- A staging copy, or an agreed maintenance window. One step deactivates every plugin, which is disruptive on a production site.
- Read access to the PHP error log. Two branches below end in a shrug without it.
- Examples use
example.comand post ID12. Substitute your own everywhere.
How it works
Loading /wp-admin/post.php?post=12&action=edit is three things happening in sequence, and only the first is PHP rendering something you can see.
First, PHP boots WordPress, runs every active plugin, and prints an admin page whose editor area is an empty container plus a stack of script tags. Nothing on it looks like an editor yet. Second, the browser fetches and executes those scripts: core’s own bundles under wp-includes/js/dist/, then every script a plugin or the theme enqueued on the editor screen. Third, the running JavaScript calls back into the site over the REST API to ask what it is editing — the post, the post type, the registered block types, the site settings, the user’s preferences.
The editor appears only after all three finish. Break any one and the container stays empty, which against a white admin background reads as a blank screen.
Two consequences are worth holding onto. A JavaScript error is fatal here in a way it is not on the front end: the editor is one graph of interdependent modules, so an uncaught exception thrown by a plugin’s editor script stops the mount and everything queued after it never runs. And because stage three is an HTTP client, the editor needs a response that parses as JSON. A PHP notice emitted by a plugin, a stray blank line after a closing PHP tag, or a byte order mark saved into functions.php by a Windows text editor all arrive ahead of the JSON body and make the parse throw. The response can be a perfectly good HTTP 200 and still be unusable.
That is also why a firewall matters more here than almost anywhere else in WordPress. Plenty of security plugins and hosting firewalls treat /wp-json/ as an attack surface and block, challenge or rate-limit it. The front end never notices. The editor cannot work without it.
Step-by-step
-
Reproduce with developer tools already open. Open the editor screen with the Console tab visible, not after the fact — several of these errors fire once, on first load. Read the first red line, not the last: later errors are usually consequences of the first. The stack trace ends in a file path, and a path under
wp-content/plugins/some-plugin/names the plugin. Then switch to the Network tab, typewp-jsoninto the filter box, and reload. You should see a short run of requests, all 200 with acontent-typeofapplication/json. Anything red, anything 403, anything whose Response tab starts with<rather than{is the fault. -
Ask the REST index directly, from outside the browser.
curl -sS -o /dev/null -w '%{http_code} %{content_type}\n' https://example.com/wp-json/Expected:
200 application/json; charset=UTF-8. A403means something is refusing the request. A404usually means permalinks are set to Plain, under which/wp-json/never resolves. Atext/htmlcontent type means you were handed a page rather than an API response — a block page, a login wall, or a challenge. -
Prove the JSON is actually parseable, and that nothing precedes it. A 200 is not enough.
curl -sS https://example.com/wp-json/wp/v2/types | python3 -m json.tool > /dev/null && echo PARSE_OKExpected:
PARSE_OKand nothing else.Expecting value: line 1 column 1means something is printed in front of the JSON body. Look at the raw first bytes:curl -sS https://example.com/wp-json/ | head -c 48 | od -cExpected: the first character is
{. Seeing357 273 277before it is a UTF-8 byte order mark; seeing words such asWarningorNoticemeans a PHP diagnostic is being printed into the response body. -
Find the file printing that early output. Byte order marks are invisible in most editors, so search for them rather than reading files:
grep -rl $'\xef\xbb\xbf' wp-content/themes wp-content/plugins --include='*.php'Expected on a healthy site: no output. Re-save any file listed as UTF-8 without a byte order mark. For PHP notices, send them to the log instead of the response:
wp config set WP_DEBUG true --raw wp config set WP_DEBUG_DISPLAY false --raw wp config set WP_DEBUG_LOG true --rawExpected after each:
Success: Added the constant ... to the 'wp-config.php' file.Reload the editor, then readwp-content/debug.log; the notice names the file to fix. TurnWP_DEBUGback off afterwards — leaving it on in production is its own problem. -
Work out whether the block is in front of PHP or inside WordPress.
curl -sS -o /dev/null -D - https://example.com/wp-json/ | grep -i -E 'HTTP/|server:|cf-ray|cf-mitigated|x-sucuri'A vendor header on a response PHP clearly never produced means an edge firewall answered, and the fix belongs there: exclude
/wp-json/wp/v2/*from the rule set, or allow your own address. If nothing edge-side appears, the block is a plugin. Security plugins commonly hook the filter that gates REST access:grep -rn 'rest_authentication_errors' wp-content/plugins wp-content/mu-pluginsExpected on a healthy site: no output. Hits are filters that can reject the editor’s calls before any route runs. Read the surrounding code before disabling anything — some are deliberate.
-
Make the JavaScript readable before you bisect. Minified bundles produce stack traces nobody can act on.
wp config set SCRIPT_DEBUG true --rawExpected:
Success: Added the constant 'SCRIPT_DEBUG' to the 'wp-config.php' file.WordPress now serves unminified scripts, so the console error names a real file and a real line. Reload and re-read the Console — this alone often ends the investigation. Remove it afterwards:wp config delete SCRIPT_DEBUG -
Bisect plugins — on staging, not on the live site. Deactivating every plugin takes down forms, carts, caching and memberships. Do it on a copy. If you genuinely must do it in production, use an agreed window and record the active set first:
wp plugin list --status=active --field=name > /tmp/active-plugins.txtExpected: a file with one plugin slug per line. Then:
wp plugin deactivate --allExpected:
Plugin 'x' deactivated.for each, thenSuccess: Deactivated N of N plugins.Reload the editor. If it now renders, reactivate in halves rather than one at a time — with twenty plugins that is five reloads instead of twenty:wp plugin activate akismet wordpress-seoExpected:
Success: Activated 2 of 2 plugins.When the editor breaks again, the culprit is in the batch you just switched on. Restore everything afterwards:xargs wp plugin activate < /tmp/active-plugins.txt -
Rule the theme out. A theme can enqueue an editor script just as a plugin can, and a block theme’s
theme.jsoncan be malformed enough to stop the editor.wp theme activate twentytwentyfourExpected:
Success: Switched to 'Twenty Twenty-Four' theme.If the editor works under a default theme, the fault is in yours — usually a script registered onenqueue_block_editor_assetsthat bundles its own copy of React instead of using thewp.elementhandle WordPress provides. Two copies of React on one page reliably produce this exact symptom. -
Raise the admin memory ceiling if the page dies partway. Truncated HTML source, or an
Allowed memory size ... exhaustedline in the PHP error log against an admin path, points here.wp eval 'echo WP_MAX_MEMORY_LIMIT, PHP_EOL;'Expected:
256Mon a default install. That constant, notWP_MEMORY_LIMIT, is the one wp-admin uses. Raise it:wp config set WP_MAX_MEMORY_LIMIT '512M'Expected:
Success: Added the constant 'WP_MAX_MEMORY_LIMIT' to the 'wp-config.php' file.WordPress cannot exceed the PHPmemory_limitset by the host, so if nothing changes, the ceiling is below WordPress. The full walkthrough is in PHP memory exhausted on WordPress. -
Check that the site agrees with itself about its own address.
wp option get siteurl wp option get homeExpected: two identical values, both on
httpsif the site serves HTTPS. Anhttp://value on an HTTPS site makes the editor request its own scripts and REST endpoints over plain HTTP, and the browser blocks them as mixed content — Console warnings, blank pane. Correct both:wp option update siteurl 'https://example.com' wp option update home 'https://example.com'Expected:
Success: Updated 'siteurl' option.A hardcodedWP_SITEURLorWP_HOMEinwp-config.phpoverrides the database, so check there too if the update appears to have no effect.
Validate it works
Run both probes first.
curl -sS -o /dev/null -w '%{http_code} %{content_type}\n' https://example.com/wp-json/
curl -sS https://example.com/wp-json/wp/v2/types | python3 -m json.tool > /dev/null && echo PARSE_OK
Expected: 200 application/json; charset=UTF-8, then PARSE_OK.
Then do the real thing, twice. Open Posts, Add New: the inserter, the toolbar and the settings sidebar should all render, and typing a paragraph should work. Now open an existing post with real content — reusable blocks, embeds, whatever your site actually uses — and confirm every block renders as a block rather than an error notice. Change one word and click Update. The success signal is the “Post updated” notice plus the change surviving a hard reload of the public URL. Reload the editor once more with the Network tab filtered on wp-json: every request 200, no red rows, nothing red in the Console.
If blocks render but come back flagged as invalid, that is a different failure with its own procedure — see Gutenberg blocks broken after a core update.
Troubleshooting
-
Blank for one user, fine for everyone else. Almost always a stored user preference or a browser extension, not the server. Try a private window with extensions disabled. If that fixes it, an ad blocker is eating a REST call; if not, clear that user’s editor preferences, since a corrupted saved state can stop the mount.
-
/wp-json/returns 404 and permalinks look correct. Set a permalink structure other than Plain, then flush withwp rewrite flush --hardand expectSuccess: Rewrite rules flushed.If it still 404s, the web server is intercepting the path beforeindex.php. -
Everything returns 200, the console is clean, the pane is still white. Look at the admin page source. If it ends mid-tag, PHP died while rendering and the fatal is in the error log, not the browser — step 9 territory even when the log line is not obviously about memory.
-
It breaks only for large posts. Short posts load, anything past a few hundred blocks does not. That is a resource ceiling: memory,
max_input_vars, or a REST response the firewall considers oversized. It is also where a blank editor and a merely slow one blur together — the performance side is in diagnosing Gutenberg editor slowdowns. -
The console error names a core file such as
blocks.min.js. Do not conclude core is broken. A minified core bundle is where a third-party script’s bad data surfaces, not where it originated. Turn onSCRIPT_DEBUGand read the trace again — the frame below usually names the real source.
When this is the wrong approach
If the front end is also down, or the rest of wp-admin is white too, none of this applies: you have a site-wide fatal error, and the answer is in the PHP error log rather than the browser console. If the screen in question is the Classic Editor or a page builder, the load path is different and so is the diagnosis. And if step 7 finds the culprit, resist the temptation to stop there — a plugin left deactivated is an outage you chose, not a fix. Report the conflict upstream with the console trace, look for an updated release, or replace the plugin; keeping it off is a holding position, acceptable for a week and not for a quarter. The API the editor depends on is documented in the WordPress REST API handbook, and the editor’s own architecture in the Block Editor handbook.
Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.