rawatweb

WordPress Changes Will Not Save: Check the REST API

Wordpress changes will not save: edits vanish, the Save button does nothing, or you see 'Updating failed'?

An editorial WordPress editor save button that stops with a failed save message.

Wordpress changes will not save: the save request never reached the database.

You write a paragraph, press Save draft, and all you get is “Updating failed. The response is not a valid JSON response.” Sometimes there is no message at all—the button stops spinning, the editor returns to its previous state, and your text is gone.

For a writer this is one of the most frustrating failures, because work can disappear without a trace. For a site owner, it means content production stops.

Short answer: the modern WordPress editor—Gutenberg, and most page builders—saves through the REST API at /wp-json/. If that request is blocked, rewritten, or fails, saving fails too. Test the endpoint, temporarily disable suspicious security plugins or WAF rules, confirm HTTPS and cookies are consistent, then read the server log for the real message. Do not paste the article into the classic editor before you know the cause; that only moves the problem.

Why the modern editor needs the REST API

Older WordPress saved posts through a plain form POST. Today’s editor behaves like an application: JavaScript sends a request to the REST API, receives JSON, and updates the view without reloading the page. The editor reports this as wordpress updating failed not valid json response, which is a symptom of a blocked request, not of lost content.

That chain has several failure points:

  • The request is blocked before reaching WordPress—by a firewall, a WAF rule, or a security plugin.
  • The endpoint is disabled by code or by a plugin that turns off the REST API “for security”.
  • The session cookie is not sent because the domain or HTTPS is inconsistent.
  • The nonce expires because the editor was open too long, or a cache served an old copy.
  • The response is altered so it is no longer JSON—for example an HTML error page injected by the host.

“Not a valid JSON response” is the most useful clue: it almost always means what arrived was not JSON, but an error page, a login page, or a firewall block.

REST API blocked by a security plugin: test the endpoint first

Before touching anything, run one simple test. Open in a browser:

https://yourdomain.com/wp-json/

The expected result is a page of JSON describing the site. What to look for:

  • JSON loads normally → the REST API is alive; the problem is the session, nonce, or editor.
  • A login page appears → the request is redirected, usually by a security rule or forced HTTPS.
  • 403 or 404 → blocked or disabled.
  • An HTML error page → the server is failing, or a plugin is writing extra output.

Many security plugins offer a setting to restrict the REST API to logged-in users. That can be reasonable for some sites, but misconfigured it can block the editor itself for certain roles—contributors, for example.

Sessions, cookies, and HTTPS

These three interlock, and mismatches produce confusing symptoms:

Inconsistent domain. If siteurl uses www but you open the site without www, session cookies may not be sent. The editor then re-authenticates on every save request.

Mixed HTTP and HTTPS. The page loads over HTTPS but some requests are redirected to HTTP (or the reverse). The browser drops or blocks cookies and the nonce is no longer valid.

Expired session. An editor left open for hours can lose its nonce. The practical fix: reload the editor page before large saves, and save drafts often.

To confirm, open the browser console and watch the Network tab when you press Save. Look at the request to /wp-json/wp/v2/.. A 401 or 403 points to authentication; a 200 with non-JSON content points to extra output or a redirect.

Wordpress changes will not save: Security plugins and WAFs — the most common cause

Security plugins and WAFs are designed to flag unusual requests. Unfortunately, REST API requests from the editor sometimes look unusual—especially ones carrying HTML, long blocks, or special characters.

Typical symptoms:

  • Saving fails only for long articles or ones with particular blocks.
  • Saving fails after several minutes of writing but succeeds if you save immediately.
  • A 403 appears with a block page from the provider rather than from WordPress.
  • It works on one network and fails on another.

What to do:

  1. Temporarily disable the security plugin, test a save, then re-enable it.
  2. Read the security plugin log—it usually records the blocked request and the rule that fired.
  3. For a hosting or CDN WAF, request an exclusion for the REST endpoints the editor uses.
  4. Do not disable protection permanently just to make saving work; find a narrow exclusion.

If a WAF is the cause, nothing you change inside WordPress will help. That is why checking the outer layer first matters before editing code.

Wordpress changes will not save: File permissions and hosting limits

If saving fails only on media uploads or file writes, the direction is different. What to check:

  • Permissions on wp-content/uploads — the upload process needs write access.
  • A full disk — WordPress cannot write revisions or temporary files.
  • post_max_size — long articles with many blocks can exceed it.
  • ModSecurity or server rules rejecting certain request bodies.
  • An object cache serving stale data so changes do not appear.

For file-related cases, the detail is in image upload fails in WordPress. If the site shows a white screen after saving, see WordPress white screen after an update.

When the save button not working gutenberg report arrives

If you have written a long piece and the save failed, there are recovery routes before giving up:

  1. Do not close the tab. Check whether the editor keeps a local draft; many do.
  2. Check Revisions. In both the classic and block editors, revisions are stored whenever a save succeeds. If an earlier save worked, the latest revision is still there.
  3. Check other tabs. If you have the editor open in two tabs, the other may hold the newer version.
  4. Copy the text into a plain editor before retrying, so it is not lost if the next attempt fails.
  5. Look at autosaves in the database if needed—this is a last resort for someone comfortable with the database.

Habits that prevent loss: save the draft every few paragraphs, and for long articles write in a plain text editor first, then paste into WordPress.

Wordpress updating failed not valid json response: when settings fail too

Saving does not always fail in the post editor. Plugin settings screens, menus, and widgets use different paths—some go through admin-ajax, some through the REST API, some through plain form posts. The symptom can look identical: the Save button does nothing, or changes revert.

For settings screens, check:

  • Request size. Settings with many options can exceed max_input_vars or post_max_size, so only part of the data is stored. The signature symptom: some settings change and others do not.
  • Redirect after save. Several plugins redirect to a page with a status parameter. If that redirect is truncated by a security rule, you land back on an empty page and assume failure.
  • User roles. Certain settings can only be changed by administrators. Users with other roles may see an active button while the request is refused.
  • Admin caching. Some plugins cache the admin panel, so changes are invisible until the cache is purged.

If the failing action is saving a menu, the check order differs—see menus and widgets missing after an update. Identifying which area fails narrows the cause quickly, because each area does not always use the same saving mechanism.

After saving works again

Once saving is normal, check a few things that are often left behind:

  • Revisions piling up. Articles with hundreds of revisions bloat the database and slow the editor. Clean them periodically.
  • Silent autosave failure. Watch whether autosave runs; if it does not, the connection issue is not fully resolved.
  • User roles. Confirm the roles that should write actually have permission, and that the security plugin is not blocking specific roles.
  • Test from another device. If only one device fails, the cause is client-side.

On sites with several authors, test contributor and author roles too—not only administrator. REST API problems often appear only for roles with limited capabilities, so the admin believes everything is fine.

Preventing a repeat

The most influential precautions:

Wordpress changes will not save when the REST request is blocked, so the browser console is the first place to look.

  • Record WAF exclusions for the REST API and admin paths in your documentation.
  • Do not disable the REST API entirely. Many features—the editor and mobile apps included—depend on it.
  • Keep domain and HTTPS consistent across siteurl, home, and server redirects.
  • Update security plugins carefully, and test saving an article afterwards.
  • Limit revisions to a sensible number, for example 10–20 per article.
  • Watch the error log so the real message is not hidden behind the editor’s generic notice.

If your site runs an editorial workflow with several writers, this procedure should be written down rather than memorised by one person. Website management services covers how that responsibility is divided, including who owns security configuration changes.

Wordpress changes will not save: what matters first

The modern WordPress editor saves through the REST API, so a failing Save button often means requests to /wp-json/ are blocked—not that the database is broken. Test the REST endpoint in a browser, temporarily disable security plugins or WAF rules, and make sure cookies and HTTPS are consistent.

Frequently asked questions

Does this mean the database is broken? Usually not. “Not a valid JSON response” more often points to a blocked request or an injected error page than to damaged data.

Why do only long articles fail to save? Possibly a server request-size limit, or a WAF rule that flags long content. Compare with a short article to confirm.

Is it safe to disable the REST API? For many modern sites, no. The editor, mobile apps, and integrations depend on it. If the goal is restricting access, limit it per role instead of turning it off.

Would switching to the classic editor fix it? Only partly. The classic editor uses a different path, but file upload and server limit problems can still occur. Fixing the cause is better.

If you have worked through these steps and saving still fails, a server configuration usually needs to be read from the logs. A free audit can help map the blocker, and the contact page is available for details: the error message, when it happens, and whether /wp-json/ loads.

Read next: WordPress Menus and Widgets Missing After an Update, Error Establishing a Database Connection in WordPress, WordPress Layout Breaks After Enabling Caching.

#wordpress cannot save #rest api #gutenberg editor #nonce
Let's talk about your website

Does any of this look like your website?

Tell us on WhatsApp. We look first, explain what needs fixing, then you decide. For a fuller picture, request the free audit.

Chat with us