Updating failed. The response is not a valid JSON response
View PDF- wordpress, error, fix
- 19
The "Updating failed. The response is not a valid JSON response" error in WordPress usually occurs due to issues with the REST API, permalinks, or server configuration. Here’s how you can troubleshoot and fix it:
1. Check Permalink Settings
A common cause of this issue is incorrect permalink settings.
Fix:
-
Go to WordPress Dashboard → Settings → Permalinks
-
Click Save Changes (even if you don’t change anything)
-
Try updating your post again
2. Check .htaccess File (Apache Servers Only)
If you are using an Apache server, a missing or misconfigured .htaccess file can cause this issue.
Fix:
-
Connect to your server via FTP or File Manager
-
Locate .htaccess in the root directory (
public_html/
) -
Rename it to
.htaccess_backup
-
Go to Settings → Permalinks in WordPress and click Save Changes (this will regenerate
.htaccess
)
If your .htaccess
file is missing, manually create one with the following default rules:
3. Increase PHP Memory Limit
Sometimes, low PHP memory can cause this issue.
Fix:
-
Edit wp-config.php (located in your WordPress root folder)
-
Add the following code before
/* That's all, stop editing! */
: -
Save the file and reload your site.
4. Check SSL and Mixed Content Issues
If your website uses HTTPS, but some resources load over HTTP, it can cause JSON errors.
Fix:
-
Install & activate the Really Simple SSL plugin
-
Go to Settings → SSL and follow the instructions to fix SSL issues
-
Clear your browser and WordPress cache
5. Disable Plugins & Themes
A faulty plugin or theme may interfere with the REST API.
Fix:
-
Disable Plugins
-
Go to Plugins → Installed Plugins
-
Deactivate all plugins
-
Try updating the post again
-
If the issue is resolved, enable plugins one by one to find the culprit
-
-
Switch to Default Theme
-
Go to Appearance → Themes
-
Activate a default theme like Twenty Twenty-Four
-
Test the post update
-
6. Enable Debug Mode
To check for detailed errors, enable WordPress Debug Mode.
Fix:
-
Edit wp-config.php and add:
-
Save and check the debug.log file in
/wp-content/
.
7. Verify REST API Status
You can check for REST API errors in WordPress Site Health.
Fix:
-
Go to Tools → Site Health
-
Look for REST API-related errors
-
If an issue is found, it might indicate a firewall or plugin conflict
8. Check Server Configuration (Nginx or Apache)
-
If using Nginx, add this to your configuration:
-
If using Apache, ensure mod_rewrite is enabled:
9. Fix File Permissions
Incorrect file permissions can prevent WordPress from processing JSON responses.
Fix:
Set proper file permissions using SSH or FTP:
Replace /var/www/html/
with your WordPress installation directory.
10. Contact US
If none of the above solutions work, check with US to see if ModSecurity, firewall rules, or server restrictions are blocking JSON responses.