๐ช๐ต๐ ๐๐ผ๐ป๐๐ฎ๐ฐ๐ ๐๐ผ๐ฟ๐บ ๐ณ ๐๐ฟ๐ฒ๐ฎ๐ธ๐ ๐ผ๐ป ๐ฆ๐๐ฎ๐๐ถ๐ฐ ๐ฆ๐ถ๐๐ฒ๐
You export your WordPress site to static HTML. Your contact form stops working. You see a 404 error in the console.
Contact Form 7 needs PHP. It uses a REST API to process data. Static sites have no PHP. No PHP means no REST API.
Some people blame CORS. A CORS header will not fix a missing server. You need a backend to handle the email.
If you use Simply Static Pro, check your file permissions. A missing JS file causes this error. Run this command:
chmod 644 /var/www/html/wp-content/plugins/simply-static-pro/assets/ssp-form-webhook-public.js
Run the export again.
Two ways to fix this:
- Keep WordPress on a subdomain. Use it as your API. Add CORS headers to your .htaccess file.
- Use a static form service. Try Formspree or Netlify Forms.
How to debug:
- Visit your WordPress URL followed by /wp-json/. If you see a 404, your backend is offline.
- Open DevTools. Submit your form. Look for 404 or CORS errors.
- Check your forms.json file. Ensure the endpoint points to your WordPress domain.
Stop treating symptoms. Fix your architecture.