WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Minify and CDN use break my site (11 posts)

  1. textbook
    Member
    Posted 1 year ago #

    I am using the latest version of wordpress and the latest version of w3 total cache. My webserver is nginx and i am using php5-fpm + php-apc.

    Every time i enable css or js minify... it breaks my site because it links to css and js files that do not exist.

    Like this...

    mysite.net/wp-content/w3tc/min/6eb57856.23428e.css
    mysite.net/wp-content/w3tc/min/c09397e5.0a1a13.js

    I'm sure that w3 total cache should be creating these files but it is not... they do not exist.

    What is the problem?

    Also... my site seems to break in the exact same way when i try to use amazon aws as a cdn.

    Is there any up to date instructions for a proper cdn setup using amazon? Everything i have seen has been out of date, and does not accurately show the latest version of the plugin.

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

  2. rahul286
    Member
    Posted 1 year ago #

    Can u paste you nginx config here?

    Most likely a line or two are wrong in it.

  3. AMediaCompany
    Member
    Posted 1 year ago #

    I've had similar problems in the past (this is not a 'me too' post). I still cannot get the rewritten files to be served over a CDN

    We got around it by
    1) turning off the 'Rewrite URL structure' in the minify 'tab',
    2) including the other files we want on the CDN on the CDN tab.

    It's not as nice, but it works. If you've not got the minify rewrite rules in your nginx configuration, it may not work.

  4. rahul286
    Member
    Posted 1 year ago #

    In both ur cases it has to be config issue.

    W3 Total Cache is very good & stable plugin.

    Try this for single-site wordpress - http://rtcamp.com/tutorials/wordpress-nginx-w3-total-cache/
    or for multisite - http://rtcamp.com/tutorials/nginx-wordpress-multisite-subdomains-domain-mapping-w3-total-cache/

  5. textbook
    Member
    Posted 1 year ago #

    Hello,

    Thank you for your response rahul286.

    This is my nginx.conf

    https://pastee.org/yuj9j

    I took it directly from what the plugin told me to use.

  6. textbook
    Member
    Posted 1 year ago #

    Sorry, that was the wrong config and it looks like i can't edit my old post.

    This is my current config.

    https://pastee.org/tzeza

  7. textbook
    Member
    Posted 1 year ago #

    Ok i figured out the problem and now minifying is not breaking my site... but the number of files is still the same... and it is still taking a long time for the initial load.

    I am using nginx + php5-fpm + php-apc + w3 total cache + minifying + cloudflare.

    I'm hosting my site on a decent vps on a paired Gbit connection.

    My site should be faster but it still has a high first load time.

  8. rahul286
    Member
    Posted 1 year ago #

    I have checked your config.

    Can you try a different config I had posted here - http://rtcamp.com/tutorials/wordpress-nginx-w3-total-cache/

    Please go through my notes I posted before config.

  9. textbook
    Member
    Posted 1 year ago #

    I actually figured everything out myself... it was because of a small mistake i made.

    But now i have a new issue, and i don't know if it is from a lack of sleep... but i can't seem to find the problem.

    I am using amazon push for my cdn... and everything seems to be working perfectly except i can't move my media files. All other files move to amazon just fine... but not media files.

    Another problem i see, is that i setup 5 cnames for cloudfront... but all the files are being served up from the fifth cname.

    That is weird to me because all the cnames say that they are reserved for specific files, like....

    cdn0.mysite.net (reserved for css)

    But all css files are being served by cdn4.mysite.net

    any help?

  10. textbook
    Member
    Posted 1 year ago #

    nevermind.... i fixed this too.

    Thank you for all of your help rahul.

    w3 total cache is a great plugin =D \o/

  11. rahul286
    Member
    Posted 1 year ago #

    Glad to know all is well :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.