|
/ Documentation /SureDonation Troubleshooting/ Ensure Secure Donations by Excluding from Caching Plugins

Ensure Secure Donations by Excluding from Caching Plugins

Caching plugins improve your website’s performance by serving static versions of your pages. However, donation forms require dynamic content, such as security tokens and payment scripts, that must be generated each time a visitor loads the page.

If a donation page is served from cache, visitors may experience errors when submitting donations. To prevent this, exclude all SureDonation pages that contain donation forms from your caching plugin.

Why Exclude SureDonation Pages from Caching?

SureDonation uses dynamic security features to protect donation submissions. When a cached version of a donation page is served, these security elements may become outdated.

This can lead to issues such as:

  • Security check failed error when submitting a donation.
  • Donation forms failing to submit.
  • Donations not reaching the payment gateway.
  • Stripe or PayPal payment fields not loading correctly.
  • Donation amounts not updating properly.
  • Legitimate donations being marked as spam when Honeypot protection is enabled.

For the best experience, donation pages should always bypass full-page caching.

Which Pages Should Be Excluded?

Exclude every page that contains a SureDonation form, including:

  • Pages using the SureDonation Form block.
  • Pages using the [suredonation_form] shortcode.
  • Individual campaign pages.
  • Any landing page that contains a donation form.

Supported Caching Plugins

SureDonation works with all popular caching plugins. If you use one of the following, make sure your donation pages are excluded from caching.

  • WP Rocket
  • LiteSpeed Cache
  • W3 Total Cache
  • WP Super Cache
  • SiteGround Optimizer
  • LWS Optimize
  • Hummingbird
  • Swift Performance
  • Any other page caching solution

Step 1: Identify Your Caching Plugin

In your WordPress dashboard:

  1. Go to Plugins → Installed Plugins.
  2. Look for any active caching or performance optimization plugin.

Step 2: Exclude Donation Pages from Cache

Open the settings for your caching plugin and add every donation page URL to its cache exclusion list.

For example:

  • /donate/
  • /campaigns/education-support/
  • /campaigns/help-children/

After saving the changes, clear or purge your website cache.

Cache Exclusion Settings for Popular Plugins

WP Rocket
  1. Go to Settings → WP Rocket.
  2. Open the Advanced Rules tab.
  3. Under Never Cache URLs, add your donation page URLs.
  4. Save your changes.
  5. Clear the cache.

LiteSpeed Cache
  1. Go to LiteSpeed Cache → Cache → Excludes.
  2. Add your donation page URLs under Do Not Cache URIs.
  3. Save the settings.
  4. Purge all caches.

LWS Optimize
  1. Navigate to LWS Optimize → Cache Settings.
  2. Locate Exclude URLs from Cache.
  3. Add your donation page URLs.
  4. Save the changes.
  5. Purge the cache.

W3 Total Cache and WP Super Cache

Open the page cache settings and locate the option similar to:

  • Never Cache Pages
  • Excluded URLs
  • Do Not Cache

Add all donation and campaign page URLs, then save your settings and clear the cache.

SiteGround Optimizer, Hummingbird, and Other Plugins

Most caching plugins include an option named:

  • Exclude URLs
  • Never Cache URLs
  • Do Not Cache Pages

Add every page that contains a SureDonation form, save the settings, and purge the cache.

Excluding SureDonation Security Nonces

SureDonation protects donation submissions using a security nonce that is generated each time the donation form loads.

Normally, excluding your donation pages from page caching is enough.

If your caching or optimization plugin provides an option to cache nonces, exclude the following nonces so they are always generated dynamically:

  • suredonation_donation_form
  • wp_rest

This helps prevent expired security tokens from being served to visitors.

Step 3: Test Your Donation Form

After updating your cache settings:

  1. Clear your website cache.
  2. Reload the donation page.
  3. Verify that the donation form loads correctly.
  4. Complete a test donation.
  5. If Honeypot protection is enabled, confirm that genuine donations are accepted successfully.

Troubleshooting

If your donation form is still not working correctly:

  • Clear your browser cache.
  • Purge your website cache again.
  • Verify that every donation page has been excluded from caching.
  • Temporarily disable your caching plugin to confirm whether caching is causing the issue.
  • Check that your payment gateway loads correctly on the donation page.

If the issue persists, contact the SureDonation support team for further assistance.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top