SEOSTUDIO™

What causes an invalid JSON response when I save in WordPress?

Save a private copy of your draft first. On protected staging, inspect the actual failed save in your browser’s Network panel. Use the response status, redirect destination, Content-Type, and body to identify which layer returned something the editor could not parse.

What does the problem look like?

The block editor says an update or publication failed, including on an ordinary draft. It may have received an HTML login page, a proxy message, or a malformed response where it expected JSON.

Before you make changes

Preserve text and block arrangement before leaving the editor. Use an authorized account, a test draft, and a recovery point for any configuration change.

Step-by-step troubleshooting

  1. Capture the one failed save

    On staging, open the Network panel and try saving once. Select the relevant request and record the method, path, status, time and Content-Type.

  2. Read the reply

    Look at any redirect and a small excerpt of the response. Identify whether you see application JSON, sign-in HTML, or a service error page.

  3. Compare the affected editing case

    Try a short unsent draft with the same permissions after saving your work and starting a fresh session. Compare it with the failing post.

  4. Fix the path confirmed by evidence

    Have the owner of the relevant session, route, or application change the specific cause. Test the correction on the protected copy.

  5. Reopen the saved draft

    Refresh in a new tab and verify the revision, exact text and draft status. Recheck the original editing workflow.

Worked example

A nonprofit communications editor can publish regular updates but not an event post. A clean staging test shows that the event-routing service is redirecting its edit request to an HTML page. The administrator fixes that specific rule on staging. Both post types then reopen with the saved changes intact.

Common mistakes

  • Signing out before rescuing unsaved content.
  • Treating a public REST check as the authenticated save test.
  • Forwarding full request headers from a logged-in session.

Verify the fix and plan a rollback

How to verify the fix

Confirm a successful response for the affected edit and check the persisted change in a fresh tab. Repeat with the editor’s actual permissions rather than with an administrator account alone.

If the change fails

If a narrow configuration correction breaks another workflow, revert it using the saved previous setting. Restore only the relevant revision if a partial save changed the article, then compare with the preserved draft.

Practical follow-up questions

What evidence should I keep before closing an unsaved tab?

Copy the content to your team’s secure working location and note its intended status. Record any custom blocks that cannot be reconstructed from plain text.

Why does the network row say 200 while WordPress says publishing failed?

Open the response and inspect its type, destination, and first lines. Some redirects end on a successful HTML page, which the editor cannot read as a REST response.

How do I tell an expired session from an unavailable route?

A response reaching the login page points to a session or access layer. Compare a fresh signed-in request on staging. A route that still returns 404 needs a path and routing check.

Does the Site Health REST result cover the save button?

It checks selected conditions. A successful check does not establish that the same authenticated route, role, and method the editor uses also succeeds.

Why might the issue affect editors and not administrators?

The relevant role can lack the capability to edit that post or post type. Repeat on staging with a matching role and compare the actual error with admin.

What does an HTML response with 403 suggest?

Determine which layer produced the page. Use its timestamp or support identifier and the host’s records. WordPress can also generate its own permission errors, so the format is useful evidence.

Can a single block explain a failed save?

A block can change the save payload or trigger a different route. Compare small test drafts with and without it, recording whether the response changes.

Can an extension print an error and still return 200?

Yes. Output can make the response body invalid even with a success status. Have the site owner find the matching PHP log entry and correct the emitting component on staging.

Should I share a browser network archive with hosting support?

Share the minimum sanitized details first. A full archive may include sessions, API headers, and private content. Use the approved channel and remove those fields.

When should I troubleshoot permalinks too?

If multiple readable routes and the relevant REST path fail in the same installation, compare the expected site paths and test existing rewrite settings on staging. Keep the two tests separate.

Free tools and website checks

Frequently asked questions

Can I simply save again after a failure?

Check the existing draft status before retrying. Some failures occur after a partial action. Preserve your draft and verify what the server stored.

How can I confirm the right person can edit?

Use a matching test role and the appropriate test post. Confirm the permitted actions when logged in through the supported route.

Does JSON in the error mean my post needs to be edited as JSON?

No. JSON is the response format for the API. Inspect what the browser received instead of converting your draft.

Official references and scope

Browser evidence can identify which layer responded. Confirm server-side causes with the authorized hosting or application owner. Never use a real published post as a write test unless it is explicitly part of the work.

Sources checked

Related guides