Back to Community

How to Fix the 'No Valid JSON Answer' Error in WordPress

15 threads Sep 23, 2025 CoreFixing 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.