WP Rocket Troubleshooting

If you have placed an Affiliate.com snippet into a page on your WordPress site and it is not showing on the front end of the site here are some troubleshooting steps you can take.

Is WP Rocket Installed?

WP Rocket (https://wp-rocket.me/) is a popular caching plugin for WordPress sites. If you have WP Rocket installed it is probably caching javascript files. To check, follow these steps.

  1. Login to your site’s WordPress dashboard.
  2. Navigate to Settings > WP Rocket, then click on File Optimization


  1. In the JavaScript Files section if the “Minify JavaScript files” setting is checked then WP Rocket will cache the Affiliate.com snippets and they will not display as expected.

Exclude Affiliate.com Snippets from cache


To make sure Affiliate.com snippets are excluded from cache and display correctly return to the WP Rocket settings page. Click on File Optimization. Under the “Minify JavaScript files” setting type the following into the “Excluded JavaScript Files” box: /snippets/(.*).js

At the bottom of the page press Save Changes.

This pattern will match the Affiliate.com snippet code and will exclude them from cache ensuring the affiliate links display properly.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us