How to solve the Caldera Forms "invalid token" problem

Caldera Forms was discontinued in 2022 – this post stays up for anyone maintaining a legacy site.

This happens when the page cache outlives the WordPress nonce, which is typically 12 hours. (That's according to Caldera's own docs, though the link's dead now that the plugin's discontinued.) To fix it, set your cache to expire in under 12 hours. See the tutorial for Swift Performance, jump to General > Cache expiry. WP Rocket should already be under 12 hours by default.

With sites hosted on GridPane, there's another cache at the server level, could be Redis or FastCGI depending on your plan and setup. You can either change the timeout rules, or exclude these pages from caching (test it via step 3 here).

If you don't have SSH or root access, connect via SFTP to /var/www/yourwebsite.url/nginx/custom-skip-redis-cache-context.conf (edit it, or create it if it doesn't exist), add the code from step 2 here, then ask GP support to reload the Nginx configuration.

All posts