Are you attempting to resolve the WordPress incorrect JSON error?
When you edit WordPress pages or posts on your website, this problem manifests. You’ll notice a message saying ‘The response is not a valid JSON response’ and updating that page would fail.
We’ll teach you how to quickly fix the incorrect JSON error in WordPress in this article. We’ll also discuss the causes of this problem and how to prevent it in the future.
What Triggers ‘Not a Valid JSON Response’ Error in WordPress?
The “Not a valid JSON response” problem in WordPress is brought on by the server failing to deliver the anticipated response.
Fundamentally, when you are changing a blog post, WordPress must get in touch with the server. It depends on receiving responses from the background web hosting server. This response typically comes in JSON format, which JavaScript uses to send data fast.
You will see the message “Not a valid JSON response” if WordPress is unable to receive the response for whatever reason or if the response is not in JSON format.

Several factors could cause this error to occur. But, misconfigured permalinks or wrong URL settings in WordPress are the most likely culprits.
In light of this, let’s look at a simple workaround for WordPress’ invalid JSON problem.
Important: Before making any significant changes to your website, always create a complete WordPress backup. This makes it simple for you to return your website to its original state.
1. Check WordPress URLs in Settings
First, you need to make sure that your WordPress Address and Site Address settings are correct.
Simply, go to Settings » General page. From here, you need to review the WordPress Address (URL) and Site Address (URL) fields.

The URL in both fields of this parameter must be the same for the majority of websites.
Rarely, though, some users might have given WordPress its own directory and made it use a different URL to deliver the website. They may have different URLs here in that instance.
But, if your Site Address is wrong, WordPress will display the invalid JSON error.
Don’t forget to click the Save Changes button to save your settings if you make any adjustments to the settings. Now that a blog post has been created, you may edit it to test if adding any additional blocks or saving it results in the “Not valid JSON response” problem.
Continue reading if you’re still getting the error.
2. Fix WordPress Permalink Structure
WordPress has a human-readable URL structure that enables you to utilize it for your posts and pages while still being SEO friendly.
Nevertheless, users occasionally make permalinks settings mistakes. This would prevent the WordPress editor from receiving a proper JSON response and result in the error.
You only need to go to the Settings » Permalinks page to correct this. From here, carefully consider your permalink possibilities.

Use one of the default formats if you aren’t sure if you’re using the correct parameters.
After that, proceed to save your selections by clicking the Save Changes option.
Now that you’ve tried changing a blog post or page, you can check to see if the problem still exists. You can attempt the following step if it hasn’t.
3. Regenerate WordPress .htaccess File
In WordPress, the .htaccess file is used as a configuration file to control URLs that are optimized for search engines (permalinks).
Normally, WordPress is able to automatically regenerate and update the file. The Settings > Permalinks page’s Save Changes button at the bottom can also be used to initiate the upgrade.
The settings, however, might not be accurate or they might not be updated. Thus, your WordPress permalinks would be impacted, and the error would still be visible. Then, by deleting the existing .htaccess file and making WordPress build a new one, you can ensure that it is clean.
Use your WordPress hosting account dashboard’s file management tool or an FTP client to connect to your website in order to repair the issue. Once you’ve connected, look for the .htaccess file in the root folder. Make a backup copy of the file on your computer.

Tip: Can’t locate .htaccess file? See this quick article on how to find .htaccess file.
After that, you need to edit the .htaccess file using FTP client or the file manager app.

Once the file opens, you need to delete all the code inside it and replace it with the following code:
# 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
Don’t forget to save your changes and upload the file back to your website.
You can now visit your website and edit and post or page to see if you can reproduce the invalid JSON response error.
If you are still seeing the error, then there are a few more steps you can take.
4. Check the Themes and Plugins
If the aforementioned techniques don’t solve the issue, you can figure out whether a theme or plugin is to blame. So, go to Appearance > Themes in your WordPress dashboard. Then switch on the standard WordPress theme to see if the issue has been fixed. If not, switch back to your previous theme.
If a plugin is to blame for the error, you must disable all plugins on your website before checking to see if the problem still exists. To do so, browse to Plugins > Installed Plugins from your WordPress dashboard. Choose the Deactivate option from the Bulk Actions drop-down box after selecting all of your WordPress plugins, then click the Apply button as displayed below.

If the error does not appear, the problem is likely due to a plugin.
To figure out which plugin is causing the issue, perform the below steps:
- Turn on each plugin separately and see if the error occurs.
- If the error persists after you enable a particular plugin, you’ll know which one is causing the error.
- You can then deactivate that plugin and activate the remaining plugins. You can further reach out to the plugin author for support or look for an alternative plugin.
5. View The Rest API Debug Log
The incorrect JSON response issue could also indicate a problem with the WordPress REST API on your website.
As you work on your website, WordPress communicates with the server using a collection of tools called the REST API.
You can see details of this error in the WordPress Site Health tool. Visit the Tools » Site Health page.

The message “The REST API received an unexpected result” may appear from this point on.
If you click on it, extra information will be displayed that might provide some hints as to which plugin or third-party service might be the problem.
You can proceed to the following step if this doesn’t yield any further information.
6. Temporarily Switch to the Classic Editor
In December 2018, WordPress upgraded its Classic Editor to the brand-new Gutenberg/Block Editor. Since then, a lot of users have run with this issue. As a result, you can use the Classic Editor to fix the problem. Installing and turning on the Vintage Editor plugin is the first step.
The old WordPress Classic Editor will take the place of the new Block Editor if you choose the Classic Editor. The future editing of your pages and posts will be affected by this. This could potentially affect how already-published pages and posts are formatted and laid out after being modified using the Block editor.
Hence, before utilizing the Classic Editor, you need first secure your site by altering a setting in it. Once you’ve activated the Classic Editor, navigate to Settings > Writing from your WordPress dashboard. From here, select Classic editor as the default editor for all users.

7. Check the Site Health
WordPress provides improvement recommendations for your website by showing the health of your site. To check the site’s health, navigate to Tools > Site Health page as shown below.

If your website’s WordPress REST API experienced an error, you can inspect it. Search for a header like “The REST API encountered an unexpected response” to do this. If you discover this problem, fixing it may resolve the JSON response error for your website.
8. Disable the Security Firewall
The editor’s connection to your server may be broken if you employ a firewall to secure your WordPress site, which may result in the “Updating failed.” message. An invalid JSON response was received error.
Disabling your WordPress firewall plugin or service for a while is the easiest way to fix this. The firewall is the source of the issue if the editor begins to function.
You can ask your WordPress provider to investigate and add the editor to a whitelist if your firewall is configured at the host level to prevent it from being activated. If you use a firewall or security plugin for WordPress, you can decide to:
- Replace your current firewall plugin with a new one that helps secure your site without causing issues.
- You can contact the plugin’s developer to help you solve the error.
9. Use Debugging in WordPress
WordPress allows you to keep a log of errors, but it’s not enabled by default. To enable it, add the following code snippet in your wp-config.php file.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
Once you’ve added the code, WordPress will maintain a log of all the errors in a debug.log file. You can access this file inside the /wp-content/ folder through the FTP client. The error log can provide you with a clue and help you solve the invalid JSON error on your site.
10. Check your current IP and remove from Blacklist
To confirm your IP address is on the PSBL blacklist, you will need to run the Passive Spam Block List check. If your IP address is on the list, you will need to submit it in the PSBL removal form and your IP address will be removed.
Go to this page to getting your current server IP: https://ip.web-hosting.com/
Last Words on Delisting a Server IP Address from the IP Blacklist
This tutorial should serve as a decent starting point even though it does not contain every single method for removing your IP address from a blacklist. With the help of these suggestions, you can relax knowing that emails received from the IP address of your server will be acknowledged.
Note: Contact your service provider and request to remove your IP Address from blacklist and add your IP to Whitelist.
Conclusion
Seeing the incorrect JSON error when using your WordPress editor can be unpleasant.
Fortunately, most websites shouldn’t have too much trouble troubleshooting this issue.
Resaving your WordPress permalinks should typically fix the problem. If it doesn’t work, you’ll need to consider other solutions, such as going over the URLs of your website, looking at the themes and plugins, adjusting your firewall, and so forth. Use the troubleshooting techniques described in this article, and your website should be operational in no time.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
