How to Fix the 'No Valid JSON Answer' Error in WordPress
Content
If you've encountered the frustrating "no valid JSON answer" error when trying to create or edit posts in WordPress, you're not alone. This common error typically occurs when there's a communication breakdown between your browser and the WordPress server during AJAX requests. Let's explore what causes this issue and the most effective troubleshooting steps.
What Causes the 'No Valid JSON Answer' Error?
This error typically appears in the WordPress block editor (Gutenberg) and indicates that the server didn't return a proper JSON response. Common causes include:
- Plugin conflicts - Incompatible or malfunctioning plugins
- Theme issues - Problems with your current theme
- Server configuration - PHP version conflicts or memory limits
- Caching problems - Aggressive caching interfering with editor requests
- Security plugins - Overly restrictive security settings
Step-by-Step Troubleshooting Guide
1. Clear All Caches
Start by clearing every cache layer:
- Clear your browser cache and try incognito/private mode
- Clear any server-side caching (WP Rocket, W3 Total Cache, etc.)
- Clear your hosting provider's cache if applicable
- Clear CDN cache if you use a content delivery network
2. Test for Plugin Conflicts
Temporarily deactivate all plugins and check if the error persists:
- Go to Plugins → Installed Plugins
- Select all plugins and choose "Deactivate" from bulk actions
- Try creating a new post
- If it works, reactivate plugins one by one to identify the culprit
Alternative method if you can't access the admin area: Rename the plugins folder via FTP/SFTP to temporarily disable all plugins.
3. Switch to a Default Theme
Theme conflicts can cause this error. Temporarily switch to a WordPress default theme like Twenty Twenty-Four:
- Go to Appearance → Themes
- Activate a default theme
- Test if the error disappears
4. Check PHP Configuration
Ensure your server meets WordPress requirements:
- PHP version 7.4 or higher (recommended: PHP 8.0+)
- Increase PHP memory limit to at least 256M
- Check for any PHP error logs in your hosting control panel
5. Enable WordPress Debugging
Add these lines to your wp-config.php file to reveal hidden errors:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check the wp-content/debug.log file for specific error messages that might point to the root cause.
6. Check for JavaScript Errors
Open your browser's developer tools (F12) and check the Console tab for any JavaScript errors that might be interfering with the editor.
Advanced Solutions
If the basic steps don't resolve the issue, try these advanced approaches:
- Increase timeout values - Add define('WP_HTTP_BLOCKING', true); to wp-config.php
- Check .htaccess file - Ensure your .htaccess file isn't corrupted
- Test with Classic Editor plugin - Install the Classic Editor plugin as a temporary workaround
- Contact your hosting provider - They can check server-level issues and error logs
Prevention Tips
To avoid similar issues in the future:
- Keep WordPress, themes, and plugins updated
- Test updates on a staging site before applying to your live site
- Use reputable plugins and themes from trusted sources
- Maintain regular backups of your website
Most cases of the "no valid JSON answer" error can be resolved through systematic troubleshooting. Start with the simplest solutions like clearing caches and testing for plugin conflicts before moving to more advanced techniques.
Related Support Threads Support
-
Access to WordPresshttps://wordpress.org/support/topic/access-to-wordpress/
-
Not seeing changes on the new navbarhttps://wordpress.org/support/topic/not-seeing-changes-on-the-new-navbar/
-
Sitem Açılmıyorhttps://wordpress.org/support/topic/sitem-acilmiyor/
-
no valid JSON answerhttps://wordpress.org/support/topic/no-valid-json-answer/
-
Have a very old version – can’t updatehttps://wordpress.org/support/topic/have-a-very-old-version-cant-update/
-
Critical Error when editing pageshttps://wordpress.org/support/topic/critical-error-when-editing-pages-2/
-
Image upload errorhttps://wordpress.org/support/topic/image-upload-error-56/
-
WP Menu problemhttps://wordpress.org/support/topic/wp-menu-problem-2/
-
Blog pages aren’t showinghttps://wordpress.org/support/topic/blog-pages-arent-showing/
-
showing 1800px wide images with 4px borderhttps://wordpress.org/support/topic/showing-1800px-wide-images-with-4px-border/
-
problems from php 7.4 to 8.3https://wordpress.org/support/topic/problems-from-php-7-4-to-8-3/
-
When users login, previously visited pages remain logged outhttps://wordpress.org/support/topic/when-users-login-previously-visited-pages-remain-logged-out/
-
Error in Mobilehttps://wordpress.org/support/topic/error-in-mobile-3/
-
Pictures not shown in full width in galleryhttps://wordpress.org/support/topic/pictures-not-shown-in-full-width-in-gallery/
-
My Website Got Hackedhttps://wordpress.org/support/topic/please-help-my-website-got-hacked/