The response is not a valid JSON response
This article will help you fix the problem with uploading images to WordPress media. If you got an error message of “The response is not a valid JSON response” while uploading images to WordPress media, then this article will help you.
This error can occur due to many reasons and three circumstances; publishing post, editing post, attaching media. Let’s explore in detail
Publishing failed. The response is not a valid JSON response.
If you cannot publish a new post, try the following fixes and check your site. One will surely work for you.
- Change from Gutenberg editor to the classic editor
- Increase PHP memory limit. Paste [define(‘WP-MEMORY-LIMIT’,’256’) in wp-config file.
- Make sure you are using the same URL address in the WordPress address and Site address.
- Rename your .htaccess file to something like .htaccess-old and then log in to WordPress dashboard and save permalink settings. This will generate a new .htaccess file.
Updating failed. The response is not a valid JSON response.
Perhaps you have recently installed an SSL certificate, and you have mixed content on your site. Some of the contents are HTTP, and some are https. You can resolve this issue by installing a Plugin Really Simple SSL. This fix will hopefully work for you. A culprit Plugin can also lead to this error message. Click here to find out that Culprit Plugin.
Upload failed. The response is not a valid response.
I was uploading images today to a post when I got an error message, ” The response is not a valid JSON response”. This error occurred for the first time to me. I searched a lot on the internet but could not find a satisfactory solution. The error message is given in the following screenshot.
I found some images uploaded successfully while others had this problem. I changed image size, but it couldn’t help me. I finally changed the image names and the error went permanently. Until this writing, I don’t know what’s so special about the image. My study continues to find out why image names are not allowed. However, this fix helps remove the problem.
If you have any idea about image names, please share with us to increase our knowledge base. I’ll update this post once I find the reason.
Also, inform us if it didn’t work for you. We’ll find another fix if it still exists at your end.