Updating failed. The response is not a valid JSON response.

Updating failed. The response is not a valid JSON response.” error is a really frustrating issue that can easily disrupt your workflow without providing clear insights into its cause or removal.

Luckily, there’s a pretty straightforward solution, and we’ll show you a few methods on how to fix this should it pops up. 👨‍🔧

Key Takeaways

  1. Refresh your site’s permalinks or regenerate the .htaccess file to resolve permalink issues that might be causing the error
  2. Check that your website’s URLs match up with your SSL certificate to keep things secure and error-free
  3. Deactivate plugins and themes one by one to identify and resolve any conflicts that could be triggering the error

How to fix “The Response is Not a Valid JSON Response.” error 🔨

Since we don’t know what causes the error on your site, trying different solutions is the best way forward.

But before we begin, take a backup of your entire WordPress website.

In this tutorial, you will need to make modifications to your site. This is risky business. It can break your site. When something goes wrong, a backup will help you restore the site back to normal. Therefore, you need to take a backup of your WordPress site before you proceed.

Generate a new .htaccess file to fix permalinks issues

One of the most common causes behind the JSON error is an issue with your site’s .htaccess file or permalinks.

To remove the error from your site, you will need to refresh your site’s permalinks, which you can accomplish in two ways.

The simplest option is to force WordPress to generate a new .htaccess file from your WordPress dashboard.

Go to Settings → Permalink. Scroll down on the Permalink page and hit the Save Changes button.

permalink page on wordpress
Scroll down on the Permalink Settings page and hit the Save Changes button

Now go back to your editor and check if the error is gone.

Still, seeing the error? Then there’s one more solution you can try before moving to the next method. You can completely delete your existing .htaccess file and then make WordPress create a new one:

1. Install FileZilla, an FTP client on your desktop. Here’s a guide on how to install FileZilla.

2. Open FileZilla and connect it with your website. This guide will show you how to make that connection.

3. Next, go to public_html and locate the .htaccess file.

4. Right-click on the file and select Download to save a copy to your local computer. This will act as a backup just in case you need it.

5. Once you have the backup, right-click on the file and select the Delete button to delete the file.

deleting htacess file in filezilla
Right-click on the .htacess file and select Delete

6. Open your WordPress dashboard and go to Settings → Permalink. Scroll down on the Permalink page and hit the Save Changes button. This will force WordPress to create a new .htaccess file.

👉 This should remove the error from your site if it was being caused by .htaccess/permalink issues. If not, then try the following solutions.

Check your WordPress site address settings

The JSON response error could be appearing because your website addresses on the Settings page are not configured properly.

To set things right, go to Settings → General and you should be able to see the two following fields:

  1. WordPress Address (URL)
  2. Site Address (URL)

Make sure your website URL is inserted in both fields. Both URLs have to be identical. And they should start with HTTPS, not HTTP (as long as you’ve installed an SSL certificate).

Then, save your changes.

Even if you don’t make any changes on the page, be sure to hit the Save Changes button.

wordpress address and site address - Updating failed. The response is not a valid JSON response.
Make sure both URLs are identical and have HTTPS in front

Fix mixed content warnings/problems

Nowadays, all websites should be using an SSL certificate, which allows you to use the HTTPS connection on your site.

However, if you migrate an older website from HTTP to HTTPS, you might end up with a situation where some older resources are still loading over HTTP instead of HTTPS. This can trigger something called a mixed content warning, which can lead to the invalid JSON response error.

In the previous section, you made sure that both WordPress Address and Site Address starts with HTTPS. This could have already fixed the mixed content issue. But just to be on the same side, install and activate this plugin: Really Simple SSL.

After installing you should see a popup with this button: Activate SSL! Click on the button. The plugin will set to work and log you out. Don’t worry. Just login in and check if the JSON error on your Gutenberg editor is gone.

If you need help setting up the plugin, take a look at this guide.

really simple ssl plugin activation - Updating failed. The response is not a valid JSON response.
Click on the Activate SSL button to move all links to HTTPS

Deactivate plugins and themes to find conflicts

Theme and plugin conflict is a common cause of WordPress errors. So in this section, we will help you figure out whether a theme or a plugin is causing the JSON response error on your website.

First, a small disclosure: Deactivating the plugins and themes may cause your site to break. You could lose some of your configurations. But if you have a backup in place, this won’t be a problem.

After you deactivate the plugins and themes and figure out which plugin or theme is causing the error, you can restore your site back to normal. Then delete the culprit theme or plugin from your website. This way, all your configurations will remain intact and the culprit will be gone.

Now, go to Appearance → Themes and activate the default WordPress theme (like Twenty Twenty, Twenty Twenty One, etc). Check if the JSON error is fixed.

If the error is gone, then delete the theme. If not, reactivate your previous theme.

Next, go to Installed Plugins, select all your plugins and under Bulk Actions, choose Deactivate and hit Apply.

deactivate all plugins - Updating failed. The response is not a valid JSON response.
Deactivate all plugins and check if the JSON error is gone

If the error doesn’t appear on your Gutenberg Editor, one of your plugins was causing it. All you need to do is figure out which of the plugins is the culprit. Start reactivating the plugins one by one. Every time you reactivate a plugin, check if the JSON error has returned.

When you find the culprit, delete the plugin. If it’s an essential part of your site, reach out to the developer of the plugin and ask for help.

Other ways to troubleshoot the invalid JSON response error

The first four solutions should enable you to remove the “Updating failed. The response is not a valid JSON response.” but if it persists, then try the following methods:

Look for REST API conflicts

WordPress uses the REST API to communicate with the server. If the communication fails for some reason, you will encounter the JSON error.

To learn if the REST API is the root of the problem, open your Gutenberg editor where the JSON error is showing, right-click on the error and select the Inspect option.

inspect option in chrome browser - Updating failed. The response is not a valid JSON response.
Click on the Inspect button and check for an REST API error

Under Console, look for a REST API error. If you find it then the error is being caused by the API.

To remove the error, you will need to seek help from your hosting provider.

Upload images in a different way

If uploading images on your post is triggering the error, try uploading them via the Media Library.

Make sure you are not using any invalid characters in the title. Just use English letters and numbers in the title of the image.

Switch to Classic Editor (temporarily or permanently)

If everything fails, then consider switching to the Classic editor. All you need to do is install the official Classic Editor plugin.

For a more detailed look, check out our guide on how to disable Gutenberg and use the Classic TinyMCE editor.

That said, if you prefer to keep using the Gutenberg editor, you will need to find a way to remove the JSON response error from your site.

👉 If you tried all the solutions listed above and still can’t remove the error, then you need professional help. Reach out to your hosting provider and tell them about all the solutions you tried. They will assist you in removing the error.

What causes the “Updating Failed. The Response is Not a Valid JSON Response.” error? 💣

When you upload an image or publish or update a post on your WordPress website, WordPress communicates the request to your web server. The server responds in JSON format.

If, for some reason, the server doesn’t respond in JSON format or doesn’t respond at all, then WordPress throws “The response is not a valid JSON response.” error.

You must be wondering: What causes the miscommunication or lack of communication between your website and the server?

The answer is that there is more than one cause. It could be a bug in a plugin or theme, an issue with the SSL certificate, .htaccess file corruption, REST API conflict, etc.

In the next section, we are going to explore these causes and figure out which one led to the error on your website.

But before we proceed to the next section, it’s worth noting that WordPress shows different variations of the same JSON error.

  • You will see this variation when you are trying to update a post: “Updating failed. The response is not a valid JSON response.”
  • This one appears when you are trying to publish a post: “Publishing failed. The response is not a valid JSON response.”
  • And a simple, “The response is not a valid JSON response.” error appears when you are uploading an image.

💡 No matter which variation you see, the solutions are the same.

Final thoughts on the WordPress invalid JSON response error 🏁

The “Updating failed. The response is not a valid JSON response.” error is one of the most common WordPress errors. It can appear when uploading an image or publishing/updating a piece of content using the new block editor (Gutenberg).

The real cause could be anything from a rogue plugin or theme to an SSL certificate issue. Removing the error is just a matter of figuring out the reason behind it and weeding it out of your site.

We hope with the help of our tutorial you were able to remove the JSON response error from your site. 😎

If you have any questions about the “The response is not a valid JSON response.” error, let us know in the comment section below.

Free guide

4 Essential Steps to Speed Up
Your WordPress Website

Follow the simple steps in our 4-part mini series
and reduce your loading times by 50-80%. 🚀

Free Access

2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Raj
January 17, 2024 3:02 am

Thank you so much – Forcing WordPress to create a new .htaccess file worked for me.

Member
Ivica
January 17, 2024 6:48 pm
Reply to  Raj

This is great news, I am very happy that this worked for you!

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!