WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Extra CDN rewrite targets + WP-Minify compatibility (2 posts)

  1. archon810
    Member
    Posted 2 years ago #

    In the spirit of knowledge dumping (keeping your notes public helps everyone, right?), I'm going to share a few CDN rewrite tweaks I had to perform in order to achieve the most optimal CDN caching possible.

    I have quite a few plugins - some of them serve their own js, css, and images. There is also an XML file that gets served by WP directly (wp-includes/wlwmanifest.xml), not sure why w3tc doesn't serve it from CDN by default. And finally, there's WP-Minify which is a working version of the minify functionality (unfortunately, I've seen too many times threads about w3tc's minify problems).

    So here goes:

    Add to wp-includes file types to upload:
    ;*.xml

    Add to custom file list:

    wp-content/plugins/wp-minify/min*
    wp-content/plugins/*.js
    wp-content/plugins/*.css
    wp-content/plugins/*.gif
    wp-content/plugins/*.jpg
    wp-content/plugins/*.png

    I am not sure if it's possible to add multiple extensions in one line ({png,jpg} or something would be nice), so I have included just the most popular file formats. You should check your own site and see if anything else is missed by the CDN rewrites.

    In my case, because the minified CSS wasn't hosted on a CDN until I added these rules, it had a side effect of all image files referenced in CSS also not getting hosted on a CDN, since they're relative to the host. Once the minified CSS was sorted, all image requests also got fixed.

    Cheers, and thanks for a great plugin, Frederick!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic