The Problem
The Gutenberg block editor fails to load, showing an infinite loading spinner or white screen. This is usually caused by JavaScript errors, blocked scripts, or plugin conflicts.
Symptoms
- Block editor shows "Loading..." spinner indefinitely
- White screen when editing posts or pages
- Console shows JavaScript errors
- "The editor has encountered an unexpected error" message
- Classic editor works but block editor does not
Real Console Errors
``` Uncaught TypeError: Cannot read properties of undefined (reading 'createBlock') at wp-block-editor.min.js:1
wp-api-fetch.min.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT ```
Common Causes
Cause 1: Ad Blocker Blocking WordPress API
Ad blockers often block /wp-json/ endpoints that the block editor needs.
Cause 2: Plugin Conflicts
Plugins that modify the editor or enqueue scripts can break the block editor.
How to Fix It
Fix 1: Disable Ad Blocker
- Pause your ad blocker for the WordPress admin domain
- Whitelist
/wp-json/and/wp-includes/paths - Try loading the editor in an incognito window (no extensions)
Fix 2: Identify Conflicting Plugin
```bash # Deactivate all plugins wp plugin deactivate --all
# Test the editor - if it works, reactivate one by one wp plugin activate woocommerce # Test editor wp plugin activate yoast-seo # Test editor # Continue until you find the culprit ```
Fix 3: Increase PHP Memory Limit
// wp-config.php
define('WP_MEMORY_LIMIT', '256M');The block editor requires more memory than the classic editor.
Fix 4: Check REST API Access
```bash # The block editor needs the REST API curl https://example.com/wp-json/wp/v2/types/post
# Should return JSON with post type information # If it returns HTML or 404, the REST API is broken ```
Fix 5: Clear Browser Cache
```bash # Or hard refresh in browser # Ctrl+F5 (Windows) or Cmd+Shift+R (Mac)
# Also clear WordPress transient cache wp transient delete --all ```
Fix 6: Disable Block Editor for Specific Post Types
```php // functions.php - fallback to classic editor add_filter('use_block_editor_for_post', '__return_false');
// Or for specific post types only add_filter('use_block_editor_for_post_type', function($use, $post_type) { if ($post_type === 'product') return false; // Classic for products return $use; }, 10, 2); ```
Fix 7: Reinstall WordPress Core Files
```bash # Corrupted core files can break the editor wp core verify-checksums
# If checksums fail, reinstall wp core update wp core update-db ```