The following information is accurate as of 7/20/2021 and pertains to WP Rocket version 220.127.116.11 and above. If you are on older version, you can disregard these steps.
We will continue to update this as necessary. When using 3rd party caching and optimization plugins, it is important to check your ads after you update as changes can have drastic impacts that aren't always evident in the release notes.
Trellis users: You can disregard these steps since none of the File Optimization settings should be active due to fundamental conflicts with Trellis.
WP Rocket is a popular optimization plugin with a robust set of features and many of these features are designed to improve a site's speed. However, in an effort to improve site speed, this can lead to issues where scripts, styles, and even ads can encounter unintended consequences.
Since so much of our technology is heavily optimized with speed being a primary concern, any additional efforts to alter how our assets load or behave can lead to a number of unpredictable issues.
To stay on the safe side of things and ensure all of your Mediavine ads and products are running as intended, just follow these steps to exclude us from their optimization settings.
You'll want to go to the Settings section of your WP Rocket plugin and click on the File Optimization section.
If there is already some text in these text boxes, just make sure mediavine has been added as its own line. Once you've made the necessary exclusions, just clear WP Rocket's cache along with any caching plugins you have installed and you'll be all set!
Note: Also double-check your Media setting for lazy loading. Lazy loading iframes can lead to unintentional issues with our ads since our ads are already lazy loaded, so just make sure that "Enable for iframes and videos" is unchecked.
Create and Grow Social
With our Create and Grow Social plugins, these include both a script and a stylesheet that need to be excluded. To exclude these plugins from being affected by WP Rocket, you'll also want to go to the same File Optimization section of WP Rocket settings.
First, you want to exclude the stylesheets for the Mediavine plugins you have installed. You can exclude Create's stylesheet by adding /wp-content/plugins/mediavine-create/(.*).css and you can exclude Grow's stylesheet by adding /wp-content/plugins/social-pug/(.*).css to the Excluded CSS Files section(if visible).
Note: You only need to worry about adding these exclusions for the visible text areas.
Once you've made the necessary exclusions, click SAVE CHANGES, and clear WP Rocket's cache along with any caching plugins you have installed and you'll be all set with your plugins!
NOTE: NerdPress has informed us that their clients already have this exclusion in place via the NerdPress Support plugin.