{"id":622,"date":"2022-08-23T09:53:07","date_gmt":"2022-08-23T13:53:07","guid":{"rendered":"https:\/\/www.amixa.com\/blog\/?p=622"},"modified":"2022-08-23T09:53:07","modified_gmt":"2022-08-23T13:53:07","slug":"the-response-is-not-a-valid-json-response-windows-iis","status":"publish","type":"post","link":"https:\/\/www.amixa.com\/blog\/2022\/08\/23\/the-response-is-not-a-valid-json-response-windows-iis\/","title":{"rendered":"The response is not a valid JSON response &#8211; Windows IIS"},"content":{"rendered":"<p>If you&#8217;re I presume you&#8217;ve already tried some other techniques to fix the &#8220;The response is\u00a0<em>not<\/em>\u00a0a\u00a0<em>valid JSON<\/em> response&#8221; issue with WordPress running on Windows Server and IIS.<\/p>\n<p>In my case, I am running PHP 8.1.8 and the issue was easy to fix.<\/p>\n<p>For me, the error happened while trying to save content to a Widget.<\/p>\n<p>In the log files I noticed the OPTIONS verb being used and a 405 error.<\/p>\n<p>The fix is simple.\u00a0 Go to HANDLER MAPPINGS, double click your PHP mapping.<\/p>\n<p>Click REQUEST RESTRICTIONS.<\/p>\n<p>Click VERBS<\/p>\n<p>do one or the other.\u00a0 Add the word OPTIONS to the current list, OR just click ALL VERBS.<\/p>\n<p>Save changes.<\/p>\n<p>Your &#8220;The response is\u00a0<em>not<\/em>\u00a0a\u00a0<em>valid JSON<\/em> response&#8221; should now go away.<\/p>\n<p>&nbsp;<\/p>\n<p>NOTE:\u00a0 On IIS WordPress setups, you need to make sure you have a HOSTS file mapping for your website to the local IP address for the website (NOT PUBLIC IP, local machine IP).\u00a0 This is necessary for the various CRON jobs to work.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re I presume you&#8217;ve already tried some other techniques to fix the &#8220;The response is\u00a0not\u00a0a\u00a0valid JSON response&#8221; issue with WordPress running on Windows Server and IIS. In my case, I am running PHP 8.1.8 and the issue was easy to fix. For me, the error happened while trying to save content to a Widget. In the log files I<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,22],"tags":[5,8,43],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-iis-tips-n-tricks","category-windows-server","tag-iis","tag-microsoft-windows-server","tag-php"],"_links":{"self":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":1,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions\/623"}],"wp:attachment":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}