So I ran into a little issue with the above two plugins playing nice. Hopefully I can save some others the frustration and Googling I went through to resolve it.
The Deets (for muh peeps)
WordPress SEO by Yoast – Great SEO plugin does a ton of things automatically. Fantastic overall if you want to make various search engines happy and take advantage of things like Google Webmaster tools.
W3 Total Cache – Another fantastic plugin, helps cache (as the name might imply) aspects of your site along with optimizing code on the fly.
However you put these two together and you’ll only get part functionality, mainly W3 Total Cache wins. One of the features that SEO by Yoast brings is the ability to create a Google compliment XML site-map. However Google expects this to be served up in wait for it… XML. W3 Total Cache goes and caches the XML page and serves up a static HTML page which in turn makes Google a sad panda. As in they won’t index your site, which is bad news if you want the populace of the internet to find you.
Long story short we need to get W3 Total Cache to leave the SEO XML pages alone and un-mangled. In order to do this we just need to exclude them from the caching process. First figure out the page names (Yes I know I could use reg-ex to do this I just like explicit control in this case.) for your XML site-map.
- Go into the SEO Plugin > XML Sitemaps.
- Click the XML Sitemap button.
- Make note of all the .XML file names these are what we want to exclude. For example:
- Next go into the Performance Plugin, you’ll need to exclude the pages above in the following sections.
- Page Cache
- Database Cache
- Also make sure
And there you have it. Follow these steps and you can have the best of both worlds, caching and SEO magic. Happy WordPressing! (that’s a verb right?)