How do I fix invalid JSON response in WordPress?

How do I fix invalid JSON response in WordPress?

How to Fix The Invalid JSON Error in WordPress (Beginner’s Guide)

  1. Check WordPress URLs in Settings.
  2. Fix WordPress Permalink Structure.
  3. Regenerate WordPress .
  4. View The Rest API Debug Log.
  5. Deactivate All WordPress Plugins.
  6. Temporarily Switch to the Classic Editor.
  7. Further Troubleshooting.

What is invalid JSON response?

An invalid JSON error can occur for many reasons. The most common issue is usually associated with a file upload attempt, and can occur when: Attempting to upload a file type that the system doesn’t recognize; or. Attempting to upload a file with a period or special characters in the file name.

Why do I get an invalid JSON response when publishing a WordPress page?

WordPress seems to do a JSON post when publishing a new post/page so I checked the network tab in my Developer Tools. If you check the “response” tab for this JSON call you might see some more details about this invalid JSON response.

How to fix failed to publish error in WordPress?

“Publishing failed. Error message: The response is not a valid JSON response.” Go to settings>permalinks. Select “Post name” and save. Try updating your posts/pages. If it doesnot work, try selecting another option in the settings>permalinks.

What to do if your JSON response does not work?

Error message: The response is not a valid JSON response.” Go to settings>permalinks. Select “Post name” and save. Try updating your posts/pages. If it doesnot work, try selecting another option in the settings>permalinks. Right now, you can use the Classic Editor plugin for fixing this issue.

How to make a WordPress post writable by WordPress?

If you keep “Post name” as the permalink setting, then the .htaccess file needs to be writable by wordpress. Alternatively the below can be pasted at the bottom of .htaccess file. Mod_rewrite changes are executed from the bottom of the file first. I had the same problem on a local dev environment and found the issue was due to rewrite permissions.