“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
- Refresh your site’s permalinks or regenerate the .htaccess file to resolve permalink issues that might be causing the error
- Check that your website’s URLs match up with your SSL certificate to keep things secure and error-free
- Deactivate plugins and themes one by one to identify and resolve any conflicts that could be triggering the error
- 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
- What causes this error?
- Final thoughts on the WordPress invalid JSON response 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.

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.

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.

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.

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.

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.

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.
For me :
esc_html_e(‘View Article’, ‘NAME_OF_ANOTHER_TEXT_DOMAIN’)
in my current theme’s functions.php file was the problem. I copied this line from old theme without changing the text domain’s name and get the error (…invalid JSON) while updating a post in the admin.
Hope it helps.
It even seems coming from the “esc_html_e()” function. I don’t have translation files, but in that case WP should silently fails on the main text ‘View article’ not translated (WP doc : “If there is no translation, or the text domain isn’t loaded, the original text is escaped and displayed.”).
But this “esc_html_e()” is in a line like :
return “… more” . esc_html_e(‘View Article’, ‘text_domain’);
which is probably generating an -slient- error.
But I don’t understand why it doens’t display an classical php page error with the number of the line cuz I have in my wp-config.php’s file:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
Anyway It’ works.
My advice :
1) I’ve changed my theme by a basic WP theme, and the error desappear,
2) I’ve tried firstly with the function.php and remove all the code and test while I was put it back little by little, so I’ve found the function/line who messed up.
Thank you so much – Forcing WordPress to create a new .htaccess file worked for me.
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)!