Publishing or uploading failed. Error message: “The response is not a valid JSON response”

If you are trying to fix the invalid JSON error in WordPress.

This error occurs whenever when we do editing post or page in wordpress website. Then your page or post failed to save and display an error: “The response is not a valid JSON response’ and updating that page would fail”.

WordPress needs to communicate with the server when you edit a blog post. The response is usually in JSON format which is used to quickly transport data using JavaScript.

But for some reason, you will be seeing error like: WordPress fails to get the response, or the response is not in JSON format, then you will be seeing the ‘Not a valid JSON response error’.

You can find many reasons for this issue. Also, you can find many solutions like:

  1. Checking WordPress Urls in the Settings->permalinks
  2. Fixing WordPress Permalink Structure
  3. Changing in the htaccess file
  4. Fixing the WordPress plugins conflict
  5. Installing the ‘Classic Editor’ and editing a post using it

But these checks might not bring you to permanent solution. If so please make changes as given below:

6. By making changes in Modsecurity

Step 1: Login to your Hosting Control Panel.

Step 2: Select Modsecurity option from the Control Panel Dashboard.

Step 3: You will find there ‘log’ option tab. Please click on that.

Step 4: Please check the error log for getting failed to save post.

Step 5: Once you have selected the specific error log, please apply the option “Skip Rule”.

Step 6: Now all set! Please edit your post now. You will get no error now.

Please let us know if this is useful to you.


Leave a Reply

Your email address will not be published. Required fields are marked *

Wordpress Social Share Plugin powered by Ultimatelysocial
Wordpress Social Share Plugin powered by Ultimatelysocial