by

The Fix for Publishing failed Error message: The response is not a valid JSON response wp

The Fix for  Publishing failed Error message: The response is not a valid JSON response
The response is not a valid JSON response wp

The Fix for Publishing failed Error message: The response is not a valid JSON response in wordpress

i got error on a new blog post, and I got this error message:

Publishing failed. Error message: valid JSON

The Fix for  Publishing failed Error message: The response is not a valid JSON response
The response is not a valid JSON response wp

Initially I thought there might be a weird, non-ASCII character in my content, because I had copied and pasted some code. So I removed the content, hit Publish again, this time no problem. Then I manually wrote a

few paragraphs, and hit Update, whereupon I got this error messageUpdating failed.

What the heck is going on!?

I did some quick searching, and it turns out that a few people have bumped into this issue, but no one seemed to have a solution. Some said hosting

security settings, others said plugin conflicts, still others said it was a Gutenberg bug and just wait for the next release.

With no obvious culprit and no obvious solution, I decided to debug it myself. I went through the standard procedure of reducing complexity:

  1. Ensure everything is up to date ———————————(if still got error then next step follow )
  2. Disable plugins ——————————— (if still got error then next step follow )
  3. Change theme to basic WordPress theme ——————-(if still got error then next step follow )
  4. Reinstall WordPress —————————————————(if still got error then next step follow )
  5. Reset Permalinks ——————————————————-(if still got error then next step follow )
  6. Remove or rename .htaccess file 

Still no luck! How is this possible? Perhaps I really did need to wait for the next WordPress release…?

While I was accessing the filesystem to remove the .htaccess file, I noticed that there was also a .user.ini file, which was created by the Wordfence plugin when optimizing its firewall. The file contained the following code:

; Wordfence WAF
auto_prepend_file = '/home/accountname/public_html/wordfence-waf.php'
; END Wordfence WAF

It seems that even with the WordFence plugin deactivated, the Wordfence firewall was still in place via this file. As soon as I removed the .user.ini file, I could publish and update again!

So that’s the cause. But we still need a solution. If you’ve come across this issue, let me know how you resolved it. In the meantime, I will continue testing and see if I can ensure Gutenberg and Wordfence play nice together.

click for follow us on Facebook wiki reviews always be updated, get new Tutorial on time

Comment

Leave a Reply

News Feed