Skip to content
Get help
HomeBug Fix LibraryWordPress Publishing Failed: Invalid JSON Response

WordPress Bug Fix Library

WordPress Publishing Failed: Invalid JSON Response

Fix WordPress “Publishing failed. The response is not a valid JSON response” errors caused by REST API, permalinks, SSL, WAF, plugins or server errors.

Reviewed and updated 2026-09-06

Quick answer

WordPress Publishing Failed: Invalid JSON Response usually means the block editor receives HTML, an error page or blocked response instead of valid REST API JSON. The safest repair starts by identifying the failing REST request in browser Network, response body and HTTP status before changing plugins, code or server settings.

Symptoms

Use the exact symptom and affected URL as the starting point. WordPress Publishing Failed: Invalid JSON Response can look similar across sites even when the root cause is completely different.

  • Gutenberg says publishing or updating failed with invalid JSON response.
  • Saving pages/posts fails while the editor still loads.
  • Browser Network shows a /wp-json/ request returning HTML or an error status.
  • The problem began after SSL, migration, security or permalink changes.

Common causes

The main areas to investigate are REST/permalink routing, HTTP/HTTPS mismatch, WAF blocks, authentication/nonces, PHP fatals or plugin output contaminating JSON. A good diagnosis narrows these possibilities with logs and request-level evidence instead of changing multiple systems at once.

  • REST API routing/permalinks are broken.
  • HTTP/HTTPS or site URL mismatch causes redirects.
  • A WAF/security plugin blocks the REST request.
  • PHP warnings/fatals corrupt the expected JSON response.
  • Authentication/nonces fail for the editor request.

Safe diagnosis

  1. Open browser Network and find the exact failing REST request.
  2. Read status and response body rather than relying on the generic editor message.
  3. Test /wp-json/ and permalink behavior outside the editor.
  4. Match server/PHP/WAF logs to the same request.

Production safety: Create a current backup or recovery point before changing code, database values, plugins, PHP, rewrite rules or server configuration. On WooCommerce and lead-generation sites, test disruptive changes in staging whenever possible.

How the issue is fixed

  • Repair REST/permalink or HTTPS routing.
  • Fix the specific security rule or plugin callback.
  • Remove PHP output/fatal errors from the REST response.
  • Retest creating, updating and autosaving content.

What to avoid

Avoid this shortcut: Do not install a classic-editor workaround as the only fix if REST is broken; other plugins and integrations may still depend on the same API.

When expert troubleshooting makes sense

If wordpress publishing failed: invalid json response is affecting revenue, wp-admin access, publishing, checkout, forms or a live campaign, the priority is a reversible fix with a documented root cause. WP•FIX separates ordinary software faults from security incidents, so suspicious redirects, unknown administrators or injected code are handled through the malware-response path instead of being treated as a normal bug.

FAQ

What usually causes WordPress Publishing Failed: Invalid JSON Response?

Common causes include REST/permalink routing, HTTP/HTTPS mismatch, WAF blocks, authentication/nonces, PHP fatals or plugin output contaminating JSON. The visible symptom alone is not enough to identify which one is responsible.

Can WordPress Publishing Failed: Invalid JSON Response be fixed without wp-admin?

Often yes. Hosting logs, SFTP/SSH, database tools, browser developer tools or the hosting control panel can provide enough evidence when wp-admin is unavailable.

Should I disable every plugin to fix WordPress Publishing Failed: Invalid JSON Response?

A full plugin shutdown can be useful as a controlled test, but on a live business site it can create new failures. It is safer to collect evidence and isolate the likely component with a reversible plan.

When should I request professional WordPress troubleshooting?

If the site is down, checkout or lead generation is affected, the error returns after a temporary workaround, or the cause is unclear from logs, a targeted diagnosis reduces risky trial-and-error.

Need WordPress Publishing Failed: Invalid JSON Response fixed?

Send the exact error or broken behavior, the affected URL and what changed before it started. No passwords are requested in the form.

Request professional troubleshooting

Professional WordPress troubleshooting

Need this issue fixed on a live site?

Send the site URL, exact symptom and what changed before the problem started. The dedicated bug-fix intake keeps technical repair requests separate from malware incidents.

Do not send passwords or hosting credentials in the form. Access is requested separately only if needed.

Your next step

Tell us what
needs attention.

Start with the site URL and what you are seeing. The WP Fix team will review the details and reply by email.

  1. We clarify the issue and the outcome you need.
  2. We confirm scope, availability and price.
  3. We agree on access and the work before making changes.

No passwords needed to start. Timing depends on the issue and current availability.

About: WordPress Publishing Failed: Invalid JSON Response

Please do not include passwords or access keys. We use your details to respond to this enquiry. Web3Forms processes the submission.