WordPress Gutenberg: Update Failed Due to Invalid JSON Response
The block editor does not save changes, although the normal page works.
How to identify the source of the problem
Check Network request for REST API and whether the server instead of JSON returns HTML error or redirection.
Check the bug log, recent plugin changes and the environment version on the site test copy.
Repair steps
Improve REST problem, permalinks, proxy or authorization and test the record of a simple entry.
How to Test Solution
The editor saves the content and the API corresponds to the correct JSON without additional HTML.
Security and restrictions
Make a backup before you migrate or update PHP. Do not enter access data in untrusted forms.