“Publishing Failed” or “Updating Failed”

Updates, Migrations & Maintenance

The editor can't reach the API, so your work refuses to save.

datacram.com/fix/publishing-failed-updating-failed
Likely causes, ranked
“Publishing Failed” or “Updating Failed”
A security plugin blocking the REST APImost likely
Broken permalinks or rewrite rulescommon
Mixed content or an SSL mismatchcommon
A server rule blocking requestspossible
Fix steps in this guide5
the causes explained below, most likely first
What you’re seeing

The block editor shows “Publishing failed” or “Updating failed. You are probably offline.” You are plainly not offline — the rest of the admin works normally.

What it actually means

The block editor does not submit a form the way the old editor did. It talks to WordPress through the REST API in the background, and saves your post through that channel.

So this message almost never means what it says. The editor tried to reach the REST API, got something other than a valid response, and reported the only failure it knows how to describe. The connection is fine; the API is unreachable or is returning something unexpected.

What usually causes it

Most likely first.

  1. 1

    A security plugin blocking the REST API

    Many offer an option to disable or restrict it, which breaks the editor as a side effect. The single most common cause.

  2. 2

    Broken permalinks or rewrite rules

    The REST route cannot be resolved because the rewrite rules are stale or malformed.

  3. 3

    Mixed content or an SSL mismatch

    The editor calls the API over a different protocol or hostname than the page, and the browser blocks the request.

  4. 4

    A server rule blocking requests

    Firewall or mod_security rules refusing POST requests to the API path.

  5. 5

    A plugin conflict returning invalid output

    A plugin printing a notice or whitespace corrupts the JSON response, so the editor cannot parse it.

How to fix it

Work through these in order. Take a backup before you change anything.

  1. Step 1Test the REST API directly

    Visit yoursite.com/wp-json/ in a browser. Valid JSON means the API is alive; an error page or a 404 means you have found the problem.

  2. Step 2Flush permalinks

    Go to Settings, Permalinks, and click Save without changing anything. That regenerates rewrite rules and fixes a surprising share of cases.

  3. Step 3Disable security plugins

    Turn them off one at a time and retry saving. If one offers a “disable REST API” setting, that is your culprit — allowlist rather than disable.

  4. Step 4Check for mixed content

    Open the browser console while saving. A blocked request or CORS error names the mismatch between how the page and the API are addressed.

  5. Step 5Use the classic editor as a stopgap

    It does not depend on the REST API, so it lets you publish urgent work while you fix the real cause.

When to stop and call someone

Call someone if wp-json returns an error you cannot interpret, if the failure is intermittent — which usually means a server firewall rule rather than a plugin — or if you are losing drafts, since an editor that cannot save is quietly costing you work.

Frequently asked

Because the block editor saves posts through the WordPress REST API, and that request failed. The message is misleading — your connection is usually fine. Something on the site is blocking or breaking the API, most often a security plugin or a permalink problem.

Visit yoursite.com/wp-json/ in a browser. A wall of JSON means the API is responding normally. An error page, a redirect, or a 404 means the API is unreachable, which is exactly why the editor cannot save.

Security and firewall plugins, especially any with a setting to disable or restrict the REST API. Some enable that restriction by default. Allowlisting the API rather than disabling it keeps the protection and fixes the editor.

Often, yes. Visiting Settings, Permalinks and clicking Save regenerates the rewrite rules the REST routes depend on. It changes no content, takes seconds, and resolves a meaningful share of these failures.

Yes. The classic editor does not use the REST API to save, so installing it temporarily lets you publish urgent work. Treat it as a stopgap rather than the fix, since the underlying API problem affects other features too.

Free · AI-powered · Emailed to you

See exactly what’s holding your website back.

Get a free audit of your site — speed, SEO, mobile, and security — with the fixes that matter most, delivered as a PDF to your inbox.

Get my free audit
CallGet a quote