Did you just come across the “Updating failed. The response is not a valid JSON response.” error when working in the WordPress block editor?
⚠️ It’s a common WordPress error and it appears on your site due to reasons like plugin and theme conflict, SSL certificate or mixed content issue, .htaccess file corruption, etc.
It’s frustrating to encounter the JSON response error. It doesn’t tell you why it’s occurring or how to remove it – it forces you to drop everything you are doing and find a way to remove the error from your website.
Luckily, the solution is straightforward.
💡 In this tutorial, you will learn what caused the error on your site and the steps you need to take to remove it.
Let’s get started.
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.
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.
🔧 Now, let’s begin with the solutions:
- Generate a new .htaccess file to fix permalinks issues
- Check your WordPress site address settings
- Fix mixed content warnings/problems
- Deactivate plugins and themes to find conflicts
- Other ways to troubleshoot the invalid JSON response error
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](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:1024/h:790/q:90/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/permalink-page-on-wordpress.png)
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](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:1024/h:870/q:eco/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/deleting-htacess-file-in-filezilla.png)
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:
- WordPress Address (URL)
- 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.](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:1024/h:789/q:eco/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/wordpress-address-and-site-address.png)
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.](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:1024/h:792/q:eco/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/really-simple-ssl-plugin-activation.png)
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.](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:840/h:646/q:eco/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/deactivate-all-plugins.png)
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.
Learn more about how to disable WordPress plugins.
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.](https://mllj2j8xvfl0.i.optimole.com/cb:jC7e.37109/w:406/h:500/q:eco/f:avif/https://themeisle.com/blog/wp-content/uploads/2022/06/inspect-option-in-chrome-browser.png)
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.
Fix the WordPress invalid JSON response error for good
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.
For some other tips on fixing common WordPress errors, you can check out our beginner’s guide to WordPress troubleshooting. 😎
If you have any questions about the “The response is not a valid JSON response.” error, let us know in the comment section below.
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)!