How to Fix “Response is Not a Valid JSON Response” Error in WordPress

How to Fix The “Updating Failed. The Response is Not a Valid JSON Response” Error in WordPress

Did you try uploading a file or adding content to your WordPress website and instead got the red notification “Updating failed. The response is not a valid JSON response”? I guess the experience was disorienting and frightening because you didn’t know what to do.

The invalid JSON error message can sometimes be annoying, especially when it appears when you are making an update or editing posts on your WordPress website. The error message can disrupt your work and keep you from performing more tasks.

Take a deep breath. Now relax, we have got your back. 

Here, we will discuss the error and how you can fix the invalid JSON error on your WordPress website. Let’s go.

What is a “Not a Valid JSON Response” Error?

Updating failed. The response is not a valid JSON response” error message appears when you upload an image or publish or update content on your WordPress website. It occurs when using a WordPress block editor, particularly when trying to add a media file directly to a block in your block editor.

What is the cause of the error?

When you edit a page or add content to your WordPress website,  the website sends a request to your web server. The server communicates its response to the website in JSON format.

If, for some reason, there’s an error in your JavaScript code or the web server doesn’t send any response back to your WordPress website, then you will get the “Not a valid JSON response” error.

There are different causes of the invalid JSON response error. We will take a look at some below and how you can fix them.

How to Fix The “Updating Failed. The Response is Not a Valid JSON Response” Error in WordPress

Now that you know what an invalid JSON response error is, we will look at some of the causes and different approaches you can take to troubleshoot the error.

1. Check the WordPress Site URL Settings

If your website displays the “Updating failed. The response is not valid JSON response” error, you first need to check the URL settings. It is probably that you have mistakenly put HTTP instead of HTTPS. 

This mixup can result in you having a mix of HTTP and HTTPS content on your site all transmitting to the web browser simultaneously. This can cause an error message to appear.

Before you get started, ensure that you have activated your SSL certificate. With your SSL activated, you can proceed with fixing the issue.

Go to your WordPress website Dashboard. Then go down to the Settings on the sidebar.

In the Settings, select General. Now, check if the URLs are set correctly. 

Once you are done with the page, you can click on Save Changes to save any changes you made on the page.

2. Check Your Website Permalink Structure

Another reason you may be experiencing this error on your WordPress website is probably because your permalink isn’t set correctly. This can cause your website to receive the wrong JSON response, resulting in an invalid JSON response error.

You can quickly fix this by going to your WordPress Dashboard.

Go to Settings and select Permalinks.

Check if the permalinks are set correctly. Once you are done fixing any error in the permalink settings, click on Save Changes. Now, go back to your website and try updating a post to see if you will receive the error message.

3. Check the Plugins

If the error doesn’t go away after you have fixed the permalink and the site URL, then you should check the plugins on the site; they may be the ones behind the error.

To be sure the error isn’t from your plugin, you will have to deactivate all the plugins on your website.

Go to your WordPress Dashboard and go to Plugins.

Select the Installed Plugins option. Select all your installed WordPress plugins, click on the Bulk Actions dropdown menu, and choose Deactivate. 

Now that you have selected the Deactivate option click Apply to deactivate all the plugins.

If, after deactivating the plugins, you don’t see the error message again, then it was probably caused by a plugin.

You must turn on each plugin separately to find the plugin causing the error. If the error appears when you turn on a particular plugin, deactivate the plugin and activate all the other plugins.

You can go ahead and find an alternative to the plugin, one that won’t cause your site to have any errors.

4. Check the Theme

If, after deactivating your plugins, the error still hasn’t gone away, the next step to take is to check the theme you are using on your site; the error may be coming from there.

Simply go to your WordPress Dashboard and navigate to Appearance.

In Appearance, select Themes. Activate the default WordPress theme.

When you have activated the default WordPress theme, check if the error has been fixed.

Leave a Reply