{"id":114898,"date":"2024-08-30T09:35:29","date_gmt":"2024-08-30T09:35:29","guid":{"rendered":"\/tutorials\/?p=114898"},"modified":"2026-03-10T09:27:22","modified_gmt":"2026-03-10T09:27:22","slug":"how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","status":"publish","type":"post","link":"\/ca\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","title":{"rendered":"How to fix the &#8220;Updating failed. The response is not a valid JSON response&#8221; error"},"content":{"rendered":"<p>The &ldquo;Updating failed. The response is not a valid JSON response&rdquo; error usually happens when the WordPress editor fails to receive a valid response from the server, preventing you from saving or publishing changes.<\/p><p>The issue occurs most often when updating your website content, and can be frustrating if you don&rsquo;t know how to deal with it.<\/p><p>In this guide, you&rsquo;ll learn the common causes of this error and the step-by-step solutions to fix it. By the end, your WordPress site will function as always, and your content updates will be applied properly.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/JSON-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\">Download comprehensive JSON cheat sheet<\/a><\/p><p>\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-causes-the-invalid-json-response-error\">What causes the invalid JSON response error<\/h2><p>The invalid JSON response error appears when WordPress tries to communicate with the server, expecting a valid response, but receives an invalid or unexpected one.<\/p><p><a href=\"\/ca\/tutorials\/what-is-json\">JavaScript Object Notation (JSON) is<\/a> a data format that transmits information between the browser and the server. This error interrupts the communication process, leading to issues with saving or updating content.<\/p><p>Identifying the root cause of this JSON error is vital to applying the correct fix. Here are some common causes:<\/p><ul class=\"wp-block-list\">\n<li><strong>Incorrect site URL settings<\/strong>. Mismatched WordPress site address settings can disrupt JSON responses.<\/li>\n\n\n\n<li><strong>Plugin conflicts<\/strong>. Incompatible or poorly coded WordPress plugins may interfere with the JSON response.<\/li>\n\n\n\n<li><strong>Server configuration issues<\/strong>. Server-side problems or insufficient resources can lead to this error.<\/li>\n\n\n\n<li><strong>SSL\/mixed content problems<\/strong>. Mixed content from HTTP and HTTPS elements can prevent proper JSON communication.<\/li>\n\n\n\n<li><strong>Permalink structure issues<\/strong>. Improper permalink settings can affect how URLs are handled, causing JSON errors.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-ways-to-troubleshoot-the-invalid-json-response-error\">Ways to troubleshoot the invalid JSON response error<\/h2><p>Here are the practical troubleshooting steps to identify and fix the invalid JSON response error. We suggest starting with the first method and moving to the next if the issue persists.<\/p><h3 class=\"wp-block-heading\" id=\"h-check-your-site-s-permalink-settings\">Check your site&rsquo;s permalink settings<\/h3><p>In WordPress,<a href=\"\/ca\/tutorials\/what-is-a-permalink\"> permalinks are<\/a> the permanent URLs to your posts, pages, and other site content. They define how your URLs are structured and displayed in the browser.<\/p><p>Improper permalink settings can disrupt your website&rsquo;s URL structure, leading to WordPress errors like the invalid JSON response. Here are the instructions to check and correct your site&rsquo;s permalinks:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard.<\/li>\n\n\n\n<li>In the left sidebar, go to <strong>Settings &rarr; Permalinks<\/strong>.<\/li>\n\n\n\n<li>Select a valid permalink structure, such as <strong>Post name<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3366715\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"553\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-permalink-settings-1024x553.png\" alt=\"The Permalink Settings page in WordPress\" class=\"wp-image-114902\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>Even if you make no adjustments, click <strong>Save Changes<\/strong> to refresh your permalink settings.<\/li>\n\n\n\n<li>Try updating or publishing your content again to see if the error is resolved.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-check-your-wordpress-site-address\">Check your WordPress site address<\/h3><p>Incorrect site URL settings can also cause the JSON error on your WordPress website. This issue occurs when the WordPress Address (URL) and Site Address (URL) don&rsquo;t match or are mistakenly configured.<\/p><p>A common cause is when you&rsquo;ve recently<a href=\"\/ca\/tutorials\/change-wordpress-domain-name\"> changed your WordPress domain address<\/a> but didn&rsquo;t update both fields. This mismatch blocks the editor from receiving a valid JSON response, resulting in the error.<\/p><p>Follow these steps to verify your WordPress site address:<\/p><ol class=\"wp-block-list\">\n<li>Access your dashboard and navigate to <strong>Settings &rarr; General<\/strong>.<\/li>\n\n\n\n<li>Ensure the <strong>WordPress Address (URL)<\/strong> and <strong>Site Address (URL)<\/strong> fields match your website&rsquo;s domain. They should also use the same protocol, either HTTP or HTTPS.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3367c4d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"451\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-general-settings-wordpress-address-url-site-address-url-highlighted-1024x451.png\" alt=\"The WordPress Address (URL) and Site Address (URL) fields in WordPress's General Settings page\" class=\"wp-image-114903\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Click <strong>Save Changes<\/strong> to apply the corrections.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-deactivate-plugins-to-detect-compatibility-issues\">Deactivate plugins to detect compatibility issues<\/h3><p>Plugin conflicts commonly cause unexpected errors in WordPress, including the invalid JSON response. A poorly coded plugin or incompatible with your current WordPress version may prevent the editor from communicating with the server properly.<\/p><p>Deactivating your plugins can help you identify if one of them is causing the problem. Here&rsquo;s how to do it:<\/p><ol class=\"wp-block-list\">\n<li>From your WordPress dashboard, go to <strong>Plugins &rarr; Installed Plugins<\/strong>.<\/li>\n\n\n\n<li>Select all plugins, choose <strong>Deactivate<\/strong> from the <strong>Bulk actions<\/strong> dropdown menu, and click <strong>Apply<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da33694a0\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"544\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-plugins-deactivate-apply-highlighted-1024x544.png\" alt=\"The Deactivate option in WordPress's Plugins page\" class=\"wp-image-114905\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Update or publish content in the editor again to check if the JSON error persists.<\/li>\n\n\n\n<li>If the error is resolved, reactivate each plugin individually and test the site after each activation to identify the culprit.<\/li>\n\n\n\n<li>After identifying the problematic plugin, update it to the latest version, find an alternative, or contact the plugin&rsquo;s developer for support.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-create-a-new-htaccess-file\">Create a new .htaccess file<\/h3><p><strong>.htaccess<\/strong> is a configuration file web servers use to manage various settings, such as redirects, access control, and WordPress permalinks. A corrupted <strong>.htaccess<\/strong> file can interfere with WordPress functionalities, leading to an invalid JSON response error.<\/p><p><a href=\"\/ca\/tutorials\/create-default-wordpress-htaccess-file\">Creating a new .htaccess file<\/a> can help resolve the issue by resetting your site&rsquo;s configuration settings. To do this, access your website&rsquo;s root folder via an FTP client like<a href=\"\/ca\/tutorials\/ftp\/filezilla-ftp-configuration\"> FileZilla<\/a> or your hosting provider&rsquo;s file manager.<\/p><p>If you<a href=\"\/ca\/wordpress-hosting\"> host your WordPress site on Hostinger<\/a>, here are the steps:<\/p><ol class=\"wp-block-list\">\n<li>Log in to hPanel with your Hostinger account and go to <strong>Websites &rarr; Dashboard<\/strong>.<\/li>\n\n\n\n<li>Click <strong>File manager<\/strong> or navigate to <strong>Files &rarr; File Manager<\/strong> via the dashboard&rsquo;s left sidebar.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da336a996\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"614\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/hpanel-websites-file-manager-highlighted-1024x614.png\" alt=\"The File manager menu in hPanel's dashboard\" class=\"wp-image-114906\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Double-click the <strong>public_html<\/strong> directory to open it.<\/li>\n\n\n\n<li>Right-click <strong>.htaccess<\/strong> and select <strong>Rename<\/strong>. Edit it to something like <strong>.htaccess_old<\/strong> to back it up.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da336bf57\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"587\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/file-manager-public-html-rename-1024x587.png\" alt=\"The Rename option in hPanel's File Manager\" class=\"wp-image-114907\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"5\">\n<li>Go to your WordPress dashboard and access <strong>Settings &rarr; Permalinks<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Save Changes<\/strong> to generate a new <strong>.htaccess<\/strong> file with default settings automatically.<\/li>\n<\/ol><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/ca\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner-1024x300.png\" alt=\"\" class=\"wp-image-111781\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-fix-any-wordpress-mixed-content-error\">Fix any WordPress mixed content error<\/h3><p>Mixed content occurs when a website loads HTTP and HTTPS elements, which can cause issues with security and functionality.<\/p><p>In WordPress, mixed content can disrupt the editor and server communication because browsers block non-secure requests on a supposedly secure page.<a href=\"\/ca\/tutorials\/fix-mixed-content-wordpress\"> Fixing mixed content<\/a> ensures all elements are loaded securely, resolving potential JSON errors.<\/p><p>Here&rsquo;s the guide:<\/p><ol class=\"wp-block-list\">\n<li>Install a plugin like<a href=\"https:\/\/wordpress.org\/plugins\/really-simple-ssl\" target=\"_blank\" rel=\"noopener\"> Really Simple SSL<\/a> or<a href=\"https:\/\/wordpress.org\/plugins\/better-search-replace\" target=\"_blank\" rel=\"noopener\"> Better Search Replace<\/a>. These plugins can detect mixed content warnings in your database and convert HTTP URLs to HTTPS.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da336deee\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"854\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-better-search-replace-1024x854.png\" alt=\"The Better Search Replace plugin page in WordPress\" class=\"wp-image-114908\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"2\">\n<li>Review your theme files, widgets, images, and other content areas for hard-coded HTTP links and manually update them to HTTPS.<\/li>\n\n\n\n<li>Clear your WordPress cache using a<a href=\"\/ca\/tutorials\/wordpress-cache-plugin\"> caching plugin<\/a> to ensure the new settings are applied correctly. Alternatively, for Hostinger&rsquo;s WordPress hosting customers, go to <strong>Dashboard &rarr; WordPress &rarr; Overview<\/strong> and hit <strong>Flush Cache<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da336f41d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"796\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/hpanel-websites-wordpress-overview-flush-cache-highlighted-1024x796.png\" alt=\"The Flush Cache button in hPanel's WordPress dashboard\" class=\"wp-image-114910\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-view-the-rest-api-debug-log\">View the REST API debug log<\/h3><p>The<a href=\"\/ca\/tutorials\/wordpress-rest-api\"> WordPress REST API<\/a> enables the editor to communicate with the server and perform tasks like saving and publishing content. If the REST API is blocked or malfunctioning, the editor can&rsquo;t receive a valid JSON response.<\/p><p>Checking the REST API debug log helps you identify any underlying issues causing this error. Follow the instructions below to view the debug log:<\/p><ol class=\"wp-block-list\">\n<li>Access your WordPress site&rsquo;s root directory via FTP or your hosting provider&rsquo;s file manager.<\/li>\n\n\n\n<li>Open the<a href=\"\/ca\/tutorials\/wp-config-php\"> wp-config.php file<\/a> and add the following code snippets before the &ldquo;That&rsquo;s all, stop editing! Happy publishing!&rdquo; line to enable debugging and logging:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">define('WP_DEBUG', true);<br><br>define('WP_DEBUG_LOG', true);<br><br>define('WP_DEBUG_DISPLAY', false);<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3370993\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1017\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/file-manager-public-html-wp-config-php-wp-debug-highlighted-1024x1017.png\" alt=\"The WP_DEBUG code snippets in the wp-config.php file\" class=\"wp-image-114911\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Once done, save your changes.<\/p><ol class=\"wp-block-list\" start=\"3\">\n<li>Go to your WordPress editor and try updating content to trigger the error and generate log entries.<\/li>\n\n\n\n<li>Access the <strong>wp-content<\/strong> directory in your site&rsquo;s root folder. Then, find the <strong>debug.log<\/strong> file and open it to view the log entries.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3371e3e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/file-manager-public-html-wp-content-debug-log-highlighted-1024x549.png\" alt=\"The debug.log file in the wp-content directory\" class=\"wp-image-114913\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"5\">\n<li>Look for entries related to the REST API in this file. These may provide clues about what&rsquo;s causing the JSON error, such as SSL certificate problems, server configuration issues, or blocked requests.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-temporarily-disable-the-security-firewall\">Temporarily disable the security firewall<\/h3><p>Firewalls<a href=\"\/ca\/tutorials\/how-to-secure-wordpress\"> protect your WordPress website<\/a> from malicious attacks by blocking suspicious requests. However, they may also block legitimate requests from the WordPress editor for security reasons, causing errors like the invalid JSON response.<\/p><p>Temporarily disabling your security firewall can determine if it&rsquo;s the source of the issue. Follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>If you use a<a href=\"\/ca\/tutorials\/firewall-for-wordpress\"> firewall plugin<\/a> like Wordfence, Sucuri, or iThemes Security, deactivate it temporarily.<\/li>\n\n\n\n<li>Users with a web application firewall (WAF) like<a href=\"https:\/\/www.cloudflare.com\/waf\" target=\"_blank\" rel=\"noopener\"> Cloudflare<\/a> or<a href=\"https:\/\/aws.amazon.com\/waf\" target=\"_blank\" rel=\"noopener\"> AWS WAF<\/a> can access the WAF website, open the settings, and temporarily disable or set it to &ldquo;Learning Mode.&rdquo;<\/li>\n\n\n\n<li>If your hosting provider has server-level firewalls, access the control panel and turn them off.<\/li>\n\n\n\n<li>Return to your WordPress editor and try saving or publishing the content. If the error has been resolved, you&rsquo;ve identified the firewall as the cause.<\/li>\n\n\n\n<li>Re-enable the firewall and adjust its settings to allow valid requests without blocking them. If you need help with what to do, contact your plugin, WAF, or hosting provider&rsquo;s support team for assistance.<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-alternative-ways-to-get-around-the-invalid-json-response-error\">Alternative ways to get around the invalid JSON response error<\/h2><p>While working on resolving the invalid JSON response error, there are temporary solutions to continue updating your content without interruptions. These methods help bypass the problem, providing a workaround until you apply a permanent fix.<\/p><p><strong>Use the Classic Editor plugin<\/strong><\/p><p>As the name suggests, the Classic Editor plugin lets you use the previous<a href=\"\/ca\/tutorials\/wordpress-classic-editor\"> classic editor<\/a>. It&rsquo;s less reliant on the WordPress REST API and can help avoid issues with the block editor. Here&rsquo;s how:<\/p><ol class=\"wp-block-list\">\n<li>In your dashboard, go to <strong>Plugins &rarr; Add New<\/strong>.<\/li>\n\n\n\n<li>Search for the<a href=\"https:\/\/wordpress.org\/plugins\/classic-editor\" target=\"_blank\" rel=\"noopener\"> Classic Editor<\/a> plugin, install it, and click <strong>Activate<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3374762\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-add-plugin-activate-highlighted-1024x445.png\" alt=\"The Activate button in the WordPress's Classic Editor plugin\" class=\"wp-image-114914\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Once activated, it will replace the WordPress block editor. Try editing your content again to see if the issue is fixed.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da3375cf2\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-edit-post-1024x532.png\" alt=\"The Edit Post page in WordPress using the classic editor\" class=\"wp-image-114915\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p><strong>Upload media files directly<\/strong><\/p><p>If the JSON error occurs when uploading images or files in the block editor, you can upload media directly through the<a href=\"\/ca\/tutorials\/wordpress-media-library-tutorial\"> media library<\/a> as a temporary solution:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Media &rarr; Add New<\/strong>.<\/li>\n\n\n\n<li>Upload your files here, then insert them into your posts or pages.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1da33772ec\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"447\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/wordpress-dashboard-upload-new-media-1024x447.png\" alt=\"The Upload New Media page in WordPress\" class=\"wp-image-114916\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>The WordPress invalid JSON response error can arise from several issues, such as incorrect URL settings, plugin conflicts, or server configuration problems.<\/p><p>This article has provided several troubleshooting steps, from checking permalinks and disabling plugins to fixing mixed content and viewing the REST API debug log. Implement these solutions methodically to identify the root cause and resolve this WordPress JSON error.<\/p><p>If the problem persists, consider contacting a WordPress professional for further assistance. Should you have any questions or tips for fixing this issue, please use the comment box below.<\/p><h2 class=\"wp-block-heading\" id=\"h-updating-failed-the-response-is-not-a-valid-json-response-error-faq\">Updating failed. The response is not a valid JSON response error FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1725010107942\"><h3 class=\"schema-faq-question\">What is the JSON response in WordPress?<\/h3> <p class=\"schema-faq-answer\">A JSON response in WordPress is data exchanged between the server and browser, particularly in the editor. WordPress uses JSON to communicate via the REST API for tasks like saving and publishing content.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1725010112849\"><h3 class=\"schema-faq-question\">How do I handle the JSON response error?<\/h3> <p class=\"schema-faq-answer\">To handle the JSON response error, check URL settings, permalinks, plugins, and server configurations. Then, follow troubleshooting steps like deactivating plugins, reviewing the REST API debug log, and adjusting security settings to resolve the issue.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1725010118732\"><h3 class=\"schema-faq-question\">How do I check if JSON is valid or not?<\/h3> <p class=\"schema-faq-answer\">To check if JSON is valid, use online tools like<a href=\"https:\/\/jsonlint.com\" target=\"_blank\" rel=\"noopener\"> JSONLint<\/a> or browser developer tools like Google Chrome&rsquo;s <strong>Network<\/strong> tab. Copy the JSON response, paste it into the tool, and validate. The tool will highlight errors in the JSON structure for correction.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>The &ldquo;Updating failed. The response is not a valid JSON response&rdquo; error usually happens when the WordPress editor fails to receive a valid response from the server, preventing you from saving or publishing changes. The issue occurs most often when updating your website content, and can be frustrating if you don&rsquo;t know how to deal [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to fix invalid JSON response error in WordPress","rank_math_description":"The invalid JSON response error means that the WordPress editor doesn\u2019t get a response from the server. Read this article to troubleshoot it.","rank_math_focus_keyword":"updating failed. the response is not a valid json response","footnotes":""},"categories":[22692],"tags":[],"class_list":["post-114898","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/mengatasi-updating-failed-the-response-is-not-a-valid-json-response","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-fix-updating-failed-the-response-is-not-a-valid-json-response-error","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/114898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=114898"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/114898\/revisions"}],"predecessor-version":[{"id":142055,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/114898\/revisions\/142055"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=114898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=114898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=114898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}