WordPress: Contact Form 7 Fallback Json Problem

Fatih Battal
2 min readFeb 26, 2021
Contact Form 7

The problem code will appear on the Browsers developer console when you post your form: yourdomain.tld/wp-json/contact-form-7/v1/contact-forms/form-number/feedback . The code always giving error code 500. So it means something messes it up on the WordPress or is it?

I tried to fix the issue on my customer’s website so it took my hours which I didn’t google it. Afterward, I open Google Search and searched for details. I found some solutions! But the solutions are needed to be categorized. So I decided to fix my issue at the first and write this article.

How to Fix this Issue?

  1. Permalink Causes: Go to WordPress Admin Dashboard, open Settings, and find the Permalinks menu. Go ahead to the Permalinks menu to reconfigure your WordPress Permalinks. It will fix your issue.
    Note: if your web server Apache, not need to do anything after that but if your webserver is Nginx, you should add this code to your Nginx configuration:

location ~ ^/wp-json/ {

rewrite ^/wp-json/(.*?)$ /?rest_route=/$1 last;

}

2. Optimizer Based (caching, optimizer, etc.): Cache plugins or Optimizer plugins are causes this problem. I was using WP-Rocket and I try to disable the plugin, it fixes my problem. Also, the same issue with my friend, he was using WP Fastest Cache, we disabled the plugin and it fixed our problem :)

Follow me on medium: Fatih Battal
Follow my Personal Blog: Fatih Battal the SEO Guy

Feel free to share, repost or like :)
Cheers

--

--