How To Fix WordPress “Publishing Failed. The Response Is Not A Valid JSON Response.” Issue

The response is not a valid JSON response copy

You may have encountered the “Publishing failed. The response is not a valid JSON response.” issue when attempting to publish or change the pages or articles on your WordPress site. This issue may also have occurred when you uploaded a picture to your WordPress site.

If you do not immediately address this mistake, you may lose all of the modifications you have made over the last several hours. This article will save you from having to deal with it.

There are a lot of different things that might cause these errors to appear on your WordPress site. It may have something to do with your website’s web server, the .htaccess file, an SSL certificate, a plugin, a theme, or anything else to do with it. Therefore, the solution that will work for you will rely on the details of your particular situation.

The solutions to the error you are now experiencing can be found below.

Update the Permalink

The .htaccess file or permalinks on your website may be the source of the JSON problem, which is one of the most typical reasons why it occurs.

You will need to refresh the permalinks on your site to eliminate the problem, and there are two different methods to do this. The quickest and most straightforward solution is to use your WordPress dashboard to activate the Force WordPress to Generate a New .htaccess File option.

Navigate to the Settings menu, then Permalink. On the Permalink page, press the Save Changes button after scrolling to the bottom of the page.

You may save your changes by scrolling to the bottom of the Permalink Settings Page and clicking the Save button.

Please return to your editor and see whether the mistake still exists; you should no longer see it.

Make use of the Classic Editor

WordPress released an upgrade to its Classic Editor in December 2018, which was known as the Gutenberg/Block Editor. Since that time, many people have been confronted with the phrase “Publishing failed. In this case, the response does not conform to the JSON response standards. And “There was an error updating.” The error message reads, “The response is not a valid JSON response.”

Therefore, many people successfully resolved the issue by switching back to the Classic Editor. To use Classic Editor on your WordPress website, you will need to first download and install the Classic Editor plugin before activating it.

If you choose to utilize Classic Editor, however, this will cause WordPress’s brand new Block Editor to be replaced with the platform’s more traditional Classic Editor. Editing your posts and pages will not work the same way for you once you make this modification. It may also affect the formatting & layout of your already-existing pages and posts, particularly those that have been updated using the Block editor in the past. Therefore, before you utilize the Classic Editor, you want to ensure that your website is protected by modifying a setting inside it.

Take Out Any Characters That Aren’t Valid

If you attempt to upload photos containing characters that are not allowed in the image name, you may also receive an error message stating, “The response is not a valid JSON response.” You are thus able to rename your picture using solely English letters, numbers, and symbols like hyphens that are supported. After that, you may try uploading the image with the new name to see whether the problem has been resolved.

Use the Default to GD plugin

A few individuals were also successful in solving the problem. When using the Default to GD plugin, you will get the “The response is not a valid JSON response” problem. Because WordPress does not yet provide this plugin, you will need to download it from the Default to GD GitHub link to use it. To begin the download process for the plugin, use the “Code” button on this page. After that, click the Download ZIP button. It will cause the plugin to be downloaded into your computer.

Afterward, go to the Plugins section of your WordPress dashboard, and click the “Add New” button. Now choose the plugin you just downloaded by selecting the Choose File option after clicking the Upload Plugin button. After that, choose the Install Now option. When the installation is finished, you must select the Activate Plugin option. You may immediately check to see whether the JSON response problem occurs when uploading photographs to your WordPress site since it does not involve any configuration on your part. If the issue persists, you may disable the plugin and remove it entirely from the system.

Final Words

These solutions for fixing the “The response is not a valid JSON response” error work for most people. Still, if they do not work for you, there may be a particular issue with the way WordPress is configured on your website or your web server is set up. This error may occur due to a problem with the REST API, an incorrect setup in the NGINX server, security plugins like Wordfence, or security policies like Web Application Firewall. In situations like these, one option is to seek solutions unique to the given locations.
Refer to Seahawkmedia for more such articles.

Get started with Seahawk

Sign up in our app to view our pricing and get discounts.