![updating-failed-the-response-is-not-valid-JSON-response](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response.png)
Updating failed: The response is no valid JSON response is a pretty normal error for WordPress users. I’ve solved this issue multiple times, twice for my websites and several other times for my client websites.
While it might sound like a complex technical glitch (and it does have its technical aspects) or hard to solve, the reality is different. It happens when your WordPress doesn’t get a response in JSON while uploading a file.
The good part is that the solution is easy and within reach. In this guide, I will walk you through five straightforward methods to tackle this error head-on. Trust me, there’s a good chance that one of these methods will work seamlessly for your website. So, let’s dive in!
Table of Contents
- 1 What’s JSON Response Not Valid Error In WordPress? Main Causes
- 2 Updating Failed: JSON Response Is Not Valid Error – 5 Ways To Fix
- 2.1 1. Remove Faulty Plugins & Themes
- 2.2 2. Check Website URL Settings & Permalink Structure
- 2.3 3. SSL Certificate & Redirection Error
- 2.4 4. Regenerate .htaccess File
- 2.5 5. Check The Security Firewall
- 2.6 6. Use Media Library For Uploading Visuals
- 2.7 What Else Can You Do? Bonus Tips
- 2.8 Frequently Asked Questions (FAQs)
- 2.9 Wrapping Up
- 2.10 Share this post
What’s JSON Response Not Valid Error In WordPress? Main Causes
It’s best to find out about the causes of this issue before moving to the solutions. But before I explain further, know that our website (WordPress) and the server we use communicate constantly whenever we post something and make small and big changes to the blog.
The same happens when you try to upload visuals like images. WordPress sends the server requests to save new visuals in the content. Now, for smooth operation, both communicate in JSON (JavaScript Object Notation) format.
However, the “JSON Response Not Valid” error occurs when these two parties, your website, and the server, encounter a language barrier. Your website sends a request in JSON format, but the server responds with something that’s not quite right or not in the expected format.
This miscommunication leads to an error message. Why the server reacts this way has no exact answer. It sometimes happens due to the poor permalink structure, security firewall, SSL redirection, etc.. I’ll discuss these possible issues along with the solutions below!
Updating Failed: JSON Response Is Not Valid Error – 5 Ways To Fix
Here are the best ways to fix the “updating failed: JSON response is not valid error.” You can read all the solutions and try them one by one. Start with following the first solution, then the second, third, and so forth.
1. Remove Faulty Plugins & Themes
My first go-to solution for almost all WordPress problems that work is to find the faulty plugins and check the theme. You may not know having faulty plugins and themes on the website can cause a lot of errors, and JSON response is one of them.
The simple solution is to find the plugins causing problems and change the theme (if it’s not working properly). However, before you do that, make sure to create a backup for the website so you can restore your blog in case something goes wrong.
Here’s how to remove faulty plugins:
- Find the “Plugins” option in the WordPress dashboard.
- Click on the checkbox to select all plugins.
![remove-faulty-plugins](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-1.png)
- Then select “Deactivate” in the drop-down menu.
![deactivate-all-plugins](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-2.png)
- Click on “Apply” to deactivate all plugins.
Here’s how to remove a faulty theme:
- Login to your WordPress account.
- Find the “Appearance” menu in the dashboard.
- Click on the “Theme” in the options.
- On the theme page, you’ll see the options of WordPress by default themes.
![faulty-themes](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-3.png)
- Select any one among the default themes and “Activate.”
![activate-default-theme](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-4.png)
If the issue is with the theme or plugin, you can upload visuals easily on the website without getting an invalid JSON response error. Then, install another theme and customize it according to your requirements.
Follow the same process for the deactivating process to activate plugins, but do it one by one. This way, you can find out which plugin is the reason behind the error. Delete that plugin, and ensure never to download it again.
2. Check Website URL Settings & Permalink Structure
The next solution is to check the WordPress website URL settings and permalink structure of your blog posts. Both points are crucial; if they’re incorrect in the settings, you might face the JSON invalid response error.
Check the WordPress Website URL
- Go to the “Settings” tab of WordPress.
- Select “General” among all options.
- You’ll be redirected to the “General Settings” page.
- Make sure your website address is the same in the URL column.
![wordpress-general-settings](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-5.png)
- Not to forget, the URL must have “https,” not “http.”
- After entering the right URL, click on “Save Changes.”
Check Website Permalink Structure
- Go to “Settings” of WordPress within the dashboard.
- Choose the “Permalink” option.
![wordpress-permalink-settings](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-6.png)
- Select “Custom Structure” and add the right tag similar to the picture.
![permalink-custom-structure](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-7.png)
- Lastly, click on “Save Changes.”
3. SSL Certificate & Redirection Error
Does the issue still persist even after ensuring the correct URL in the settings? If you still see the same error, check whether you have an SSL certificate. It authenticates the identity of the website’s owner and makes the visitors feel secure.
Bloggers who don’t have this SSL certificate won’t have HTTPS in the URL, leading to JSON error. This is why, first, make sure to buy and install an SSL certificate. You can purchase it separately or buy hosting that offers SSL.
Redirection errors in WordPress, caused by conflicting HTTPS redirects, can result in different issues. As a result, you may face the Invalid JSON Response error. So, you’ll need two separate certificates, on your origin server and that provided by the CDN.
4. Regenerate .htaccess File
.htaccess file is another common reason many of us face the “updating failed: the response is not valid JSON response” error. This file is like a manager for your website’s web addresses (URLs).
When we update or add new stuff to the website, this file helps manage how those web addresses work. Sometimes, the file can get messed up or become outdated, causing permalink issues that lead to JSON invalid response errors.
What to do? Well, in this type of situation, regenerating the .htaccess file to create a fresh, updated version can fix the JSON errors and will keep your website running smoothly. Below are the steps you need to follow to regenerate this file.
Here’s how to regenerate the .htaccess file for your website:
- Login to your hosting account and select the “File Manager” option.
![cpanel-file-manager](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-8.png)
- Click on the “Public_html” folder.
![server-public-html](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-9.png)
- On the top corner, choose “Settings.“
![server-settings](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-10.png)
- Mark the checkbox to show hidden files starting with (.) like .htaccess file.
![enable-hidden-files](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-11.png)
- Right-click on the .htaccess file and choose “Edit.”
![htaccess-file](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-12.png)
- Open the file, select all code, and then paste the one I’ve written below:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] # END WordPress
- Save the code and see whether you’re facing the same issue.
5. Check The Security Firewall
Sometimes, security firewalls also become the reason for invalid JSON response errors. If your firewall operates at the host level, contact your WordPress hosting provider. Ask them to investigate the issue further.
However, the solution is easy if you’re using security firewall plugins. You only need to deactivate the plugin and install a new, reliable one. Just go to the “Plugins” section, select the plugin, and click on “Deactivate.”
6. Use Media Library For Uploading Visuals
If nothing works, you need to contact an expert to seek help. The chances are the issue is quite serious, and you won’t be able to solve it alone. However, that doesn’t mean you can’t update your blog posts now; I have a solution.
The solution is to use the Media Library until you solve this problem permanently. If you use “Media Library” to upload the visuals, you can easily bypass the “Updating failed: The response is not valid JSON error.”
Here’s how to use media library for uploading visuals:
- Choose the “Media” option in the dashboard.
- Click “Add New” and upload the image you want to add.
![wordpress-media-section](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-13.png)
- Once you add the file, go back to the posting page.
- Instead of “Upload,” select the “Media Library” option.
![media-library-section](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-14.png)
- Choose the image you want to upload from the media library, and that’s it.
What Else Can You Do? Bonus Tips
If you’ve gone through the entire article and tried all the methods above, the issue is serious. You need to seek an expert for help, but before you do this, try these simple tips; maybe they’ll work and save money.
- Use Right Image Names: When you name your images, only use regular letters, numbers, and hyphens. This helps make sure your image names work well on your website.
- Try the Classic Editor: If you see the JSON error while using the new editor, you can switch back to the Classic Editor by using the plugin called Classic Editor.
- Turn on WordPress Debugging: To find and fix the JSON error, you can turn on WordPress debugging. Just add this code to your wp-config.php file:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
Frequently Asked Questions (FAQs)
What does updating a failed response is not a valid JSON response mean?
The website and WordPress communicate in JSON format when you update the content on the blog. However, when the hosting server responds differently (not in JSON format), we see this invalid JSON error.
How to fix publishing failed the response is not a valid JSON response localhost?
To fix the publishing failure: the response is not a valid JSON response error, go to “Settings” > “Permalinks” and save this structure: https//yourwebsitename.url/%postname%/. You can see the image below to understand the URL structure.
![wordpress-permalink-custom-settings](https://blog.fastdot.com/wp-content/uploads/2023/11/fix-updating-failed-the-response-is-not-valid-json-response-7.png)
Wrapping Up
I understand the WordPress error “Updating Failed: The Response Is Not Valid JSON Response” can be a frustrating roadblock, but fear not! It’s not impossible to solve. I’m confident one of my solutions will work for you; you must follow the steps carefully.
However, in case nothing works, don’t get discouraged. Take a deep breath, and try to get help from someone who’s an expert in solving WordPress errors. You can also get help from your friends or the internet. Happy troubleshooting!