fbpx

Troubleshooting the “Updating failed. The response is not a valid JSON response.” Error on a WordPress Site

The “Updating failed. The response is not a valid JSON response.” error can occur on a WordPress site, this can be caused by different factors as I’ll discuss later.

In this guide, we will discuss the common causes of this error and the steps you can take to troubleshoot and fix it.

What Does The Error Mean?

The Updating failed. The response is not a valid JSON response error is an issue that can occur when updating a plugin, theme, content, or WordPress core update.

This error message occurs when the update process is expecting a JSON response from the server but instead receives an invalid response.

This can prevent the update from being completed and cause issues with the site’s functionality.

Why You Should Troubleshoot This Issue

Troubleshooting the “Updating failed. The response is not a valid JSON response” error is important because it can prevent updates from being completed and cause issues with the site’s functionality.

For example, if a plugin or theme update is not completed, it can lead to compatibility issues with other plugins or themes, causing them to malfunction.

Furthermore, if a WordPress core update is not completed, it can leave the site vulnerable to security risks.

Troubleshooting and resolving this issue promptly can ensure that the site is running smoothly and securely.

Common Causes of the “Updating failed. The response is not a valid JSON response” Issue

Here are the most common causes of the “Updating failed. The response is not a valid JSON response” error:

  1. Browser cache and cookies: When the browser stores a copy of a website’s files, it can cause problems when trying to update the site. The stored files may be outdated and can prevent the update from being completed, resulting in this error.
  2. Plugin conflicts: Some plugins can have compatibility issues with other plugins or the theme, causing them to interfere with the update process and result in this error.
  3. Low PHP memory limit: WordPress updates require a certain amount of memory to run and if the PHP memory limit is too low, it can cause this error to occur because the update process may not have enough memory to complete.
  4. Corrupted files: Damaged or corrupted files on your server can prevent updates from being completed, resulting in this error.
  5. Server-side issues: Some issues can be caused by server-side problems, like the server not being configured to handle JSON responses, which can cause the error.
  6. Network issues: If there’s a problem with the network that your site is hosted on, it can prevent updates from being completed, resulting in this error.

Steps To Take In Troubleshooting The Issue

In my experience, following these troubleshooting steps should fix the “Updating Failed. Invalid JSON Response” error.

  1. Clear browser cache and cookies
  2. Check for plugin conflicts
  3. Increase the PHP memory limit
  4. Check the website’s error logs
  5. Deactivate and reactivate, reinstall or change your theme
  6. Contact hosting provider
  7. Make a backup of your website

Now, let me explain how to go about each and every step.

1. Clear browser cache and cookies

Clearing browser cache is one of the initial troubleshooting steps that can be taken to resolve the “Updating failed. The response is not a valid JSON response” error.

Clearing the browser cache will erase the stored copies of a website’s files. This may be outdated, and prevent the update from being completed.

It’s important to note that different browsers have different ways to clear cache.

Also, it’s recommended to refer to the browser’s support documentation for instructions on how to clear the cache for that specific browser.

Read my detailed guide on how to fix caching issues on a WordPress site. The caching processes for common browsers are highlighted there.

2. Check for plugin conflicts

Checking for plugin conflicts is an important step in troubleshooting the “Updating failed. The response is not a valid JSON response” error.

To check for plugin conflicts, you should deactivate all the plugins.

After that, re-enable them one by one and check if the error occurs again when a specific plugin is activated.

If you find that a specific plugin is causing the error, you can try finding an alternative plugin or contact the plugin developer for support.

3. Increase Memory Limit

Increasing the PHP memory limit is a step that can be taken to prevent the “Updating failed. The response is not a valid JSON response” error from occurring.

To increase the PHP memory limit, you need to edit the “wp-config.php” file and add the following line:

define('WP_MEMORY_LIMIT', '256M') . 

This will increase the PHP memory limit to 256MB, which should be enough for most updates to run.

However, it’s important to note that increasing the PHP memory limit too much can cause other issues on the website. So, it’s recommended to start with a moderate increase and monitor the site’s performance.

Watch the video below to understand better how to increase memory limit.

4. Check Your website’s error logs

Checking the error logs of a WordPress site is an important step in troubleshooting the “Updating failed. The response is not a valid JSON response” error.

The error logs contain information about any issues that have occurred on the site, which can help you identify the cause of the error.

To check the error logs, you can use a plugin such as “Error Log Monitor” or “Error Log Viewer” that can display the logs on the WordPress dashboard or you can check the server error log file.

Furthermore, you could watch this video below for how to enable our WordPress site error log.

It’s important to note that some hosting providers might not provide access to the error logs.

In that case, you should contact your hosting provider for assistance.

5. Deactivate and reactivate, reinstall or change your theme

Deactivating and reactivating a WordPress theme is a step to troubleshooting the “Updating failed.

The response is not a valid JSON response” error. To deactivate a theme, you can go to the Appearance > Themes section in the WordPress dashboard, and switch to a different theme.

To reactivate the theme, you can switch back to it in the same section.

This process can help to resolve any issues with the theme that may be causing the error.

To reinstall a theme on a WordPress site, you can delete the theme from the Appearance > Themes section in the WordPress dashboard and then upload the theme again.

In case, you want to change your theme, you can go to the Appearance > Themes section in the WordPress dashboard and activate a different theme of your choice.

This process can help to resolve any issues with the theme that may be causing the “Updating failed. The response is not a valid JSON response” error by replacing any corrupted or outdated files with fresh ones.

6. Contact Your Hosting Provider

In case all the above troubleshooting methods did not work for you, it is necessary to contact your hosting provider.

When reaching out to them, you should inform them of the steps you’ve already taken to troubleshoot the issue.

Also, you could send the error logs of your site as discussed in step 4 above.

In most cases, your host always has a solution to this issue.

7. Backup Your Site

It’s important to backup a website before attempting to troubleshoot the “Updating failed. The response is not a valid JSON response” error, because troubleshooting steps may cause unintended changes or data loss.

Having a backup of the site allows you to restore the site to its previous state in case of any issues.

To manually backup your WordPress site, you can use a plugin such as “UpdraftPlus” or “BackupBuddy” to export the site’s database and files. Or you can manually export the database using phpMyAdmin and use an FTP client to download the site’s files.

It’s also a good idea to save a copy of the backup files to a separate location, like an external hard drive, cloud storage, or an email.

It’s important to make sure that the backup files are complete, and that your site can be restored using them.

Watch the video below to see other ways in which you can manually backup your WordPress site.

Conclusion

The “Updating failed. The response is not a valid JSON response” error can occur when updating a plugin, content, theme, or WordPress core update.

There are several causes of this error, such as browser cache, plugin conflicts, low PHP memory limit, and corrupted files.

Troubleshooting steps like clearing browser cache and cookies, checking for plugin conflicts, increasing the PHP memory limit, checking the website’s error logs, changing your theme, contacting your hosting provider, and making a backup of your website can help to resolve the issue and ensure that the site is running smoothly and securely.

If you found this article useful, you may also enjoy reading how to fix mobile menu issues on a WordPress site, how to optimize content for multiple keyphrase with the Yoast Free version, and how to safely delete a WordPress theme.

Leave a Comment