Wordpress Upload Response String Format Is Not a Valid Json: [
Fix the annoying WordPress mistake Publishing failed. The response is not a valid JSON response., Updating failed. The response is not a valid JSON response., or The response is not a valid JSON response.
You may have seen these errors when trying to publish or update your WordPress posts or pages. You may even have see this error when trying to upload an prototype in your WordPress website.
If you don't bargain with this error right away, you may lose all the changes that you have fabricated for the by few hours (yes, we humans still go by hours without saving our work). This article is about rescuing you lot from that.
There are many reasons for why these errors can occur to your WordPress site. It can be related to your spider web server, .htaccess file, SSL certificate, a plugin, a theme, or for another reason. So depending on your specific scenario, a different solution may work for you lot.
Hither, I accept outlined all the methods that will help you solve this error. Be it Publishing failed. Error message: The response is not a valid JSON response., Updating failed. Mistake message: The response is not a valid JSON response., or just The response is not a valid JSON response.
Try using the following methods one by one and you should find the 1 that works for you. But in lodge not to lose your piece of work progress, open your WordPress dashboard in a new window and try the solutions there.
Update Permalink
Warning: Updating permalink structure may change the URL of all your website pages and posts so the previous URLs to admission your pages and posts won't work. Your website's SEO will also exist afflicted by this. Therefore, if keeping your original URL is important, yous may either non want to try this one or revert back to the original permalink construction as shortly as the exam is completed. Merely if your website is brand new, y'all don't have to worry about it.

The most common solution for publishing or updating failed the response is not a valid JSON response error is to update your permalink structure.
From your WordPress dashboard, go to Settings and then Permalinks. Then y'all can click on the Salvage Changes button to re-save or update the current permalink structure. So check to see if the error is stock-still.
If information technology doesn't ready the fault then you can go dorsum to the permalink page and and so select Plain from under the Custom Settings heading to change the permalink structure. And so click on Relieve Changes. Now check again to see if the error has been solved.
If the error hasn't resolved, then you can try changing to all the other permalink structures and bank check if the fault gets solved for whatsoever of them.
If this solution doesn't work for you try the next 1.
Use Classic Editor
In December 2018 WordPress updated their Classic Editor with the new Gutenberg/Cake Editor. And since then many accept faced this "Publishing failed. The response is not a valid JSON response." and "Updating failed. The response is not a valid JSON response." error.

So, by going back to the Archetype Editor many have been able to solve the mistake. In order to utilize Classic Editor, you will need to install and actuate the Classic Editor plugin on your WordPress website.
However, if you use Archetype Editor, this will supercede the new Block Editor of WordPress with its former Classic Editor. This will change how y'all are used to editing your pages and posts. This may besides affect the formatting and layout of your existing pages and posts that take been previously edited using the Block editor. So, you should safeguard your site showtime by changing a setting in the Classic Editor before you kickoff using it.

So, to safeguard from affecting your existing pages, after you lot activate the Classic Editor plugin, go to Settings and then Writing from the WordPress dashboard. This will bear witness you the settings for the Classic Editor plugin. From here, select "Yes" for the option "Allow users to switch editors". Then click on Save Changes. This will let y'all utilise the Gutenberg/Block editor for your existing pages and posts so you won't have to exist concerned about losing existing work in instance y'all desire to edit any existing pages or posts on your site. This will also give you the selection to edit whatever new pages or posts with either Block editor or the Classic editor.
And then endeavor creating a new page or postal service using the Classic Editor and check if the JSON response error has been fixed.
From the plugin'due south settings folio, you can besides select "Block Editor" every bit the option for "Default editor for all users" if yous would similar to make the Block Editor your default WordPress editor while using the Archetype Editor plugin.
Using the Classic Editor might solve the JSON response error for you while updating or publishing your pages and posts. But if information technology doesn't solve the error, then you tin can simply conciliate the plugin and try out the adjacent solution.
Configure SSL
Your website always needs to have TLS/SSL enabled or web browsers will testify a warning bulletin whenever someone tries to visit your website. That alert will brand your site look unsafe and so you will lose lots of your website visitors. That'southward why properly setting up SSL certificate for your website is an important thing to do regardless of it solving "The response is non a valid JSON response" error.
In this office, I will tell y'all how yous tin can properly set up your WordPress website to utilize SSL certificate which is likewise a very common solution to the JSON response error.
Utilize SSL Certificate
Y'all can cheque if your site is using SSL certificate by looking at the URL of your website. Afterward your website is loaded in a web browser, you can click on your website'due south URL to run into if the URL starts with HTTPS or HTTP. If information technology starts with HTTPS and if you encounter a padlock icon without a cross sign beside the URL, then your site is already configured with SSL certificate. And so, you will just need to ensure that your website is using it properly.

For instance, if your website is example.com then it will await like https://case.com and information technology will be marked with a padlock icon after it loads in your web browser if it is properly set up with SSL certificate.
However, having no padlock icon doesn't ever mean that an SSL certificate hasn't been issued or your website. Instead, the reason might be that your website hasn't been configured to automatically redirect all HTTP traffic to the HTTPS version of your website. To check if that is the case, change your website URL'due south HTTP to HTTPS on the web browser and press enter. If the browser at present shows a padlock icon beside the URL, then an SSL certificate has been issued for your site but it isn't configured properly. So, we will need to configure it properly.
But if changing HTTP to HTTPS doesn't work, then that it is probably because an SSL document hasn't been issued for your website. And if that is the case, then you will starting time need to issue an SSL certificate for your website. If you are using cPanel, Plesk, DirectAdmin, CyberPanel or any other web hosting command panel, then you tin easily issue an SSL certificate for your website from that web hosting control panel. Encounter their guide on how to do that.
Additionally, the validity of SSL certificates expires subsequently a certain period so you may likewise check if your SSL document is withal valid. If it is not valid then you should first renew the SSL certificate to set up the SSL related issues. Once a valid SSL certificate is installed on your WordPress site, y'all can follow the next steps here to solve Publishing failed. The response is non a valid JSON response. or Updating failed. The response is not a valid JSON response. error.
Force HTTPS Redirect
Using your spider web hosting control panel like cPanel, Plesk, CyberPanel, etc., you lot can easily redirect all HTTP traffic to the HTTPS version of your website. The process of doing this volition differ based on the hosting control panel y'all are using merely you lot should easily find an selection to practice that in the SSL settings or in the domain settings pick on the control panel. Expect for settings that say something similar force HTTPS redirect, redirect HTTP to HTTPS, and and then on. See their guide on how to practise that.
If yous aren't using a hosting control panel or if this doesn't work for you then you can use the Really Simple SSL plugin to do that. I accept described it further in the next footstep "Solve Mixed Content Error" which is also very important to solve SSL related issues for your WordPress site. So, fifty-fifty if this step solves the error, you should still follow the next step to solve the mixed content error on your website.
Solve Mixed Content Error
Your webpages will generally require linking multiple files like CSS, JS, images, etc. to display and role properly. And the links for these files may contain HTTP or HTTPS. If your website is configured to use HTTPS but if some of those links are using HTTP instead of HTTPS, in that location will be a mixed content mistake.

To solve this problem you can install the Actually Unproblematic SSL plugin on your WordPress site. It will modify all links on your website to use HTTPS and therefore solve the mixed content error.

After you install and actuate the Really Simple SSL plugin, y'all will get a notification to actuate SSL. So, click on the "Get ahead, activate SSL!" button on the notification. But if you don't run across the notification then from your WordPress dashboard, go to Settings and select SSL.
And so y'all will see the same button saying "Go ahead, actuate SSL!". One time you click on the button it will activate SSL and set HTTPS redirect for your website.

And so it volition give y'all will run into a warning that says "WordPress 301 redirect enabled. We recommend to enable the 301 .htaccess redirect choice on your specific setup". Beside that warning, y'all will see a link saying "Enable". Clicking on the link will have you to the Settings tab on the plugin. Y'all can also go to the same page from your WordPress dashboard by going to Settings so SSL and then by selecting the Settings tab.

Hither, you will meet an option saying "Enable 301 .htaccess redirect". Plough on the push abreast that to activate HTTPS redirect from your .htaccess file. Before enabling the button yous tin can also read the warning on how to regain access to your site in case of a redirect loop issue. And then after enabling the push button click on Relieve.

Also, from your WordPress dashboard, y'all can go to Settings then General. This will show you lot "WordPress Accost (URL)" and "Site Address (URL)". Make certain that these URLs are using HTTPS and non HTTP.
After doing this, check if the JSON response error has been fixed. If information technology doesn't get fixed, yous can also go to Settings > SSL > Settings and then turn on the push beside the "Utilise alternative method to fix mixed content" choice and then salve the change.
At present, check if the JSON response error has been fixed. If it hasn't, then turn off the button abreast the "Use alternative method to fix mixed content" pick and save the change over again and so follow the next solution.
Check Themes and Plugins
If the previous methods don't work for y'all then you can attempt to find out if it is whatever theme or plugin that is causing the trouble. So, get-go, go to Appearance and so Themes from your WordPress dashboard. Then activate the default WordPress theme (as of now it is Twenty Twenty) and bank check if the mistake is fixed. If non, then revert dorsum to your original theme.
The error may also cause by a plugin and in that case you tin can deactivate all the plugins on your website and so cheque again to see if the error occurs. If the error doesn't occur then it is probably a plugin that is causing the event. And so, to find out which plugin is causing the problem, turn on one plugin at a time and cheque if the error occurs. And if the error occurs afterward enabling a certain plugin, then you will know that is the one causing the problem. And so, you can merely deactivate that plugin and activate the residuum of the plugins that you need.
Restart OpenLiteSpeed
If yous are using OpenLiteSpeed spider web server, and so in that location is a very high chance that a restart volition solve your problem.
OpenLiteSpeed is the open source or free version of the LiteSpeed Web Server (also known as LIteSpeed Enterprise). One of the major differences between LiteSpeed Enterprise and OpenLiteSpeed is that LiteSpeed Enterprise autodetects changes in .htaccess file and adjusts as necessary in realtime just OpenLiteSpeed tin can't do that and then it requires restarting for any changes in the .htaccess file to take identify. And because WordPress uses the .htaccess file for many operations, those inactive .htaccess changes in the OpenLiteSpeed server may also crusade The response is non a valid JSON response error. If you encounter this error subsequently calculation a new website on your OpenLiteSpeed server, this may besides be the reason.
Then, if yous are using OpenLiteSpeed web server, a restart of the OpenLiteSpeed server can solve the error for you.

If you lot are using CyberPanel spider web hosting panel with OpenLiteSpeed, so you lot can open your CyberPanel dashboard then go to Server Status then LiteSpeed Status. And so you lot can click on the Reboot LiteSpeed push to restart your OpenLIteSpeed server.
But if yous are using a different web hosting console or if you lot aren't using whatsoever web hosting panel at all, then you volition need to find out how to restart the OpenLIteSpeed server for your specific setup.
Update .htaccess
If none of the previous methods piece of work then you tin can attempt configuring your .htaccess file.
In order to ensure that you lot tin revert back to your original .htaccess file in case annihilation goes incorrect, you can keep a fill-in of it past downloading it in your figurer. If you know how to use an FTP customer or the file manager of your web hosting control panel like cPanel, CyberPanel, etc., and so you tin download the .htaccess file from your website's "public_html" folder.

If yous want an easy solution and desire to do everything from WordPress dashboard and then install and activate a file manager plugin like Advanced File Manager on your WordPress website.

So from your WordPress dashboard, go to File Manager and then Settings. From hither put a checkmark beside the Display .htaccess? option then click on Save Changes.

At present click on File Manager to see all the folders and files for your website. Here, in the "public_html" folder of your website, yous will see the ".htaccess" file. Correct-click on the file and click Download to go on a backup of information technology.
And then, at present you volition be able to easily re-upload the original .htaccess file to the same location in case anything goes wrong.
Now, disable all the plugins on your WordPress site. Then delete the .htaccess file so that nosotros can start from the beginning.
Now, go to Settings so Permalinks from your WordPress dashboard. Then, make certain the permalink pick of your choice is selected and then click on Save Changes. This volition create a new .htaccess file for your website.
Now you need to check if "The response is not a valid JSON response" error is stock-still or not.
If the error has been stock-still, and so you can plough on one plugin at a time and check if the error occurs again. If the error occurs subsequently enabling a sure plugin then you tin can just deactivate that i and activate the other plugins as y'all need.
But if the error isn't stock-still after saving your permalink, and then you can select the other permalink structures i later another and bank check if the JSON response has been fixed. Retrieve to change your permalink construction to the original one after your testing with different permalink structures is finished if y'all want to continue your previous URL structure.
But if that doesn't fix "The response is not a valid JSON response" error, then you will need to follow the previously mentioned steps for Forcefulness HTTPS Redirect and Solve Mixed Content Error one more time. Do these steps while all your plugins are nonetheless deactivated.
This should solve the error for your website. And if the problem is solved, then activate all your plugins again one by ane and bank check if any of them cause any trouble. If the error doesn't occur once more, then the trouble has been fixed but if the problem occurs after installing any specific plugin then simply deactivate that plugin and actuate the other ones.
After you activate the plugins, the .htaccess rules associated with the plugins should automatically be created to your new .htaccess file based on the existing plugin settings. And then, you shouldn't lose any configurations this way. But if something doesn't work properly, then you can open both the .htaccess files in the editor or in a text document and compare the rules in both the .htaccess files. Then you tin can update the new .htaccess file with the changes you establish. You can fifty-fifty delete the new .htaccess file and and then upload the original i to go back to the previous land.
Check Site Health
From your WordPress dashboard, if yous get to Tools then select Site Health, then under the Status tab on that folio, WordPress will testify you whatever comeback recommendations that could assistance your website.

An effect related to Rest API could too cause the JSON response error on your website. Moreover, if you lot find any issue there, solving the issue might as well fix the JSON response mistake for your website.
Set up Image Upload Error

If yous have tried the previous methods but "The response is not a valid JSON response" error still occurs when you effort to upload images on your WordPress website, then you can follow the instructions in this department.
Use Media Library Instead of Direct Upload
If you are trying to upload images in an Image block using the Upload button, and so y'all might get the JSON response error but surprisingly many people have found that if they beginning select Media Library then go to the Upload Files tab and then upload images from in that location and so the mistake doesn't occur.

This might be a temporary workaround simply it tin can be helpful if you lot are in the centre of writing a mail or if any other methods don't piece of work for you lot.
Remove Invalid Characters
You may likewise get "The response is not a valid JSON response" mistake if you try to upload images with unsupported characters in the prototype name. So, you can rename your paradigm using only English letters, numbers, and supported symbols similar hyphens. And so yous can upload that renamed image to come across if the error has been fixed.
Use Default to GD plugin
Some people were also able to solve The response is non a valid JSON response error by using the Default to GD plugin. This plugin isn't available on WordPress so you lot will demand to download information technology from the Default to GD GitHub link.

To download the plugin click on the "Lawmaking" push on the page. And then select Download ZIP. This will download the plugin on your computer.

And then get to your WordPress dashboard and so Plugins then Add New. Now click on Upload Plugin push then upload the plugin yous just downloaded by clicking on the Cull File button. So click on Install Now. Afterward the installation is completed, click on Activate Plugin. Information technology doesn't require whatsoever fix upward so you can now check if the JSON response error occurs while uploading images to your WordPress site. And if the error notwithstanding occurs, then you can only deactivate and then delete the plugin.
These methods for solving "The response is not a valid JSON response" fault works for most people merely if it doesn't work for you lot then you may take a specific problem in your WordPress settings or in your web server setup. This fault can also cause because of an issue related to the REST API, misconfiguration in NGINX server, security plugins similar Wordfence or for security rules like WAF or Spider web Application Firewall. In these cases, you lot can look for solutions specific to those areas.
I hope one of these methods works for yous and if works let me and others know which one worked for you. And if you found whatsoever other solution tell united states in the comments section so that it can assist others.
Source: https://webspeedtools.com/fix-the-response-is-not-a-valid-json-response-wordpress/
Post a Comment for "Wordpress Upload Response String Format Is Not a Valid Json: ["