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.

AdRotate follows the implementation guide by W3 Total Cache and uses their Fragmented caching feature. If it doesn’t work it’s very likely you didn’t configure the caching plugin correctly. Alternatively you can decide to just not enable caching support in AdRotate – Your adverts will show up just fine but rotation and stats using the internal tracker may be affected.

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

Caution: This is a manual edit to your wp-config.php file. Making typos or mistakes in this file may cause your site to fail!

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.

adrotate-w3tc-wp-config

Article Details

Article ID:
46
Rating :

Related articles

More plugins and services

AdRotate Pro Single License
AdRotate Professional
Banner manager

Get started with successful advertisement campaigns on your WordPress and Classicpress website within minutes. Use features like Geo Targeting, scheduling and post injection to start making that passive income!
AJdG Solutions Plugins
All my plugins
WordPress and Classicpress

Check out my handy plugins for WordPress and Classicpress. Also take a look at these extensions for WooCommerce and bbPress and run your webshop and forum more efficiently!