Nahrávání......
🚀 Premium Nameserver Update!

Our premium nameservers are now live: ns1.securedns93.com and ns2.securedns93.com - Faster, more reliable DNS resolution for all your domains!

For WordPress hosting use: ns3.securedns93.com and ns4.securedns93.com

🔥 .COM Domain Rush is Live now!

Biggest domain sale! .COM domains at just ₹639 only - Get yours now!

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:

  1. Go to WordPress Dashboard → Settings → Permalinks

  2. Click Save Changes (even if you don’t change anything)

  3. 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:

  1. Connect to your server via FTP or File Manager

  2. Locate .htaccess in the root directory (public_html/)

  3. Rename it to .htaccess_backup

  4. 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:

apache
 
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress

3. Increase PHP Memory Limit

Sometimes, low PHP memory can cause this issue.

Fix:

  1. Edit wp-config.php (located in your WordPress root folder)

  2. Add the following code before /* That's all, stop editing! */:

    php
     
    define('WP_MEMORY_LIMIT', '256M');
  3. 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:

  1. Install & activate the Really Simple SSL plugin

  2. Go to Settings → SSL and follow the instructions to fix SSL issues

  3. Clear your browser and WordPress cache


5. Disable Plugins & Themes

A faulty plugin or theme may interfere with the REST API.

Fix:

  • Disable Plugins

    1. Go to Plugins → Installed Plugins

    2. Deactivate all plugins

    3. Try updating the post again

    4. If the issue is resolved, enable plugins one by one to find the culprit

  • Switch to Default Theme

    1. Go to Appearance → Themes

    2. Activate a default theme like Twenty Twenty-Four

    3. Test the post update


6. Enable Debug Mode

To check for detailed errors, enable WordPress Debug Mode.

Fix:

  1. Edit wp-config.php and add:

    php
     
    define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
  2. 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:

  1. Go to Tools → Site Health

  2. Look for REST API-related errors

  3. 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:

    nginx
    location / { try_files $uri $uri/ /index.php$is_args$args; }
  • If using Apache, ensure mod_rewrite is enabled:

    sh
     
    sudo a2enmod rewrite sudo systemctl restart apache2

9. Fix File Permissions

Incorrect file permissions can prevent WordPress from processing JSON responses.

Fix:
Set proper file permissions using SSH or FTP:

sh
 
find /var/www/html/ -type d -exec chmod 755 {} \; find /var/www/html/ -type f -exec chmod 644 {} \;

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.

Byla tato odpověď nápomocná?