Configure W3 Total Caching to work with AdRotate
AdRotate has basic support for the popular W3 Total Cache and Borlabs Cache plugins. Which you can enable in AdRotate settings. The developers of WP-Rocket have informed me that AdRotate works with their plugin, too. No configuration required according to them, but I have not tested this myself.
If you’re using Borlabs Caching, take a look at the guide for that plugin instead.
Set up with W3 Total Cache
- In AdRotate Settings under Misc enable the checkbox for W3 Total Caching.
- If prompted by AdRotate; Add the W3TC_DYNAMIC_SECURITY definition to your wp-config.php file (See below for details).

Configuring W3 Total Cache
How to fully set up W3 Total Cache is beyond the scope of this page. Check the W3 Total Cache manuals or contact its developer for help with that if you need it.
- In General Settings set the Page Caching to Disk: Basic.
- In Page Cache under Advanced enable Late Initialization.
- If you use the Minify option add ‘mfunc’ to the ignored comment stem field.
You need to flush the cache after making these changes.
Setting up the Dynamic Security hash for W3 Total Cache
Here’s how to add the W3TC_DYNAMIC_SECURITY definition to your site. The string is randomised and should be treated as a password. Adding this line to your WordPress setup allows W3 Total Cache to use fragmented caching in a secure manner.
- Login to your site via (s)FTP and look in the root/base directory of your site.
- Download the wp-config.php file to your desktop.
- Edit the file with your favourite Editor – I use Coda 2.
- Somewhere below Line 52 add the line as directed by AdRotate.
- Save and upload the wp-config.php file overwriting the current online version.
For my version of wp-config.php the first best spot was on line 57. Right below the WordPress security salts.
