Table of Contents
- What Does “Not a Valid JSON Response” Actually Mean?
- The Emergency Bypass: Install “Classic Editor”
- Step 1: The Quick Fix (Permalinks)
- Step 2: Checking the REST API Status
- Step 3: SSL and Mixed Content Issues
- Step 4: The Plugin and Theme Conflict Test
- Step 5: Inspecting the Engine Room (Console & Logs)
- Summary Checklist
What Does “Not a Valid JSON Response” Actually Mean?
When you click “Update” or “Publish,” the modern WordPress editor (Gutenberg) uses the REST API to talk to your Linux server. It expects a response in a clean data format called JSON. If your server encounters a PHP error, a firewall block, or a 404 page, it sends back that “noise” instead. The editor doesn’t know how to read it, so it throws the “Not a valid JSON response” error.
The Emergency Bypass: Install “Classic Editor”
If you are in a hurry and just need to update your content right now, there is a simple workaround: install the Classic Editor plugin. The modern Block Editor relies heavily on the REST API, which is usually where the “Invalid JSON” breakdown happens. The Classic Editor uses an older, more direct method of saving data that often bypasses these communication errors entirely.
- Go to Plugins > Add New and search for “Classic Editor.”
- Install and Activate it.
- Try updating your post again.
Note: This is an excellent “quick fix” to get your site updated, but keep in mind that it hides the underlying problem rather than fixing it. You should still investigate the steps below to ensure your server and REST API are healthy for the long term.
Step 1: The Quick Fix (Permalinks)
In many cases, this error is caused by a broken .htaccess file or a glitch in your URL structure. WordPress relies on these “Permalinks” to route the REST API calls correctly through your Linux server.
- Go to Settings > Permalinks in your dashboard.
- Without changing any settings, scroll to the bottom and click Save Changes.
- This forces WordPress to refresh your server’s routing rules, which often clears the communication block instantly.
Step 2: Checking the REST API Status
If the REST API is being blocked, the modern editor cannot function. You can check this using the Site Health tool.
- Navigate to Tools > Site Health.
- Look for any critical errors stating “The REST API encountered an unexpected result.”
- If you see this, a security plugin (like Wordfence) or a server-level firewall (like ModSecurity) might be blocking the editor’s requests.
Step 3: SSL and Mixed Content Issues
If you recently moved your site or added an SSL certificate, you might have a “Mixed Content” error. This happens when your site loads over HTTPS, but the editor tries to send data over HTTP. Browsers block this for security, resulting in an invalid response.
Ensure your Site Address and WordPress Address under Settings > General both start with https://. If they don’t match, update them and try saving again.
Step 4: The Plugin and Theme Conflict Test
A plugin or theme might be outputting a small PHP “Notice” or “Warning” in the background. This text “pollutes” the JSON response, making it unreadable.
- Deactivate Plugins: Turn off all plugins except the one you are currently using. If the error disappears, reactivate them one by one until you find the culprit.
- Switch Themes: Temporarily switch to a default theme like Twenty Twenty-Four. If the error stops, your theme has a coding conflict with the block editor.
Step 5: Inspecting the Engine Room (Console & Logs)
To see exactly what the server is sending back, you can look at the raw data in your browser:
- Right-click on your editor page and select Inspect.
- Go to the Network tab and click “Update” in WordPress to trigger the error.
- Look for a red entry (usually
postsorautosave). Click it and look at the Response tab.
If you see HTML code or a PHP error message instead of a clean JSON bracket { }, that is the specific code causing the crash.
Summary Checklist
| Action | Result |
|---|---|
| Install Classic Editor | Immediate bypass to save content now. |
| Save Permalinks | Fixes routing and .htaccess issues. |
| Verify HTTPS | Resolves SSL/Mixed Content blocks. |
| Check Site Health | Identifies REST API and Firewall blocks. |

Conclusion: Whether you use the Classic Editor as a quick bypass or dive into the Linux server logs for a permanent fix, the “Invalid JSON” error is solvable. Stay calm, follow the steps, and get your content live.