• We’ve been adding W3 onto sites for about a year now and have it on about 24 sites. Over the past few months we’d suddenly get calls from clients that their site was looking ‘all weird’, ‘was broken’, etc. We’d check, and find that W3’s minifying was acting up. It’d either leave out files or just not load any minified ones at all.
    Recently we found where Minify can be on and so it’ll change the page HTML to use all the minified links, but on the server zero minified files are actually created and so they all return 404s. We started verifying this behavior on brand new sites – minified files WOULD be created initially. However after clearing the cache a few times for misc reasons (with minify still working) suddenly a site would break – none of the minified css or js files in the page source could load because they don’t exist on the server. No more minified files are ever created for such a site once this happens and there’s nothing at all we can find that’ll get it working again. Minify has to be turned off from that point or else no JS or CSS loads in the frontend. We’ve tried turning W3 off and on again, minifying off and on again, using other minify methods besides Disk and the default minifiers, deleting all cache folders, etc. We’ve also gone through these forums and others and have looked at fixes for any possible related issue, but all is set correctly and nothing has fixed one of these instances – not even once. It’s like minifying permanently stops creating files forever and that’s that. No errors, no anything to go on why.
    Some of the new sites we just launched had this happen, prompting me to post here as it’s a super troublesome issue (about 18 of 24 sites now have minify off indefinitely). All these sites are on standard LAMP/Nginx servers using standard wordpress and plugins, with themes like Elementor and Divi. There’s no other issues on any of them to note site-wise, plugin-wise or other.
    We’ll keep trying to troubleshoot but so far absolutely nothing ‘re-starts’ the the minifier working on any site. Once the Purge all Modules is clicked it can be the last Minify ever works on a site. (A few times the Purge all Modules left the minified files, but they didn’t have the correct names so the issue remained.)
    Any ideas or inputs or similar situations anyone has seen would be very helpful.
    Thanks,
    Magestyx

    • This topic was modified 1 year, 4 months ago by magestyx.
    • This topic was modified 1 year, 4 months ago by magestyx.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter magestyx

    (@magestyx)

    Here’s a pretty simple site this is happening on: adwerx.net
    We just tried turning off “Rewrite?URL?structure” (normally on) and the site looks fine again with the css loading in like :

    <link rel="stylesheet"  media="all">

    It’s not a file created in the /minify directory, and it’s not actually minified. The code inside looks like an intermediate file before the minification process should happen.

    /* 123-css-output.css */
    
    /* 1   */ /* xl - DESKTOP STYLES */
    /* 2   */ .box-type-1 {
    /* 3   */ 	border: 5px solid #000000;
    /* 4   */ }
    /* 5   */
    /* 6   */ .box-type-2 {
    /* 7   */ 	background: #afafaf;
    /* 8   */ }
    /* 9   */
    /* 10  */ .box-type-1 h2 {
    /* 11  */ 	font-size: 12px !important;
    /* 12  */ 	color: #ff0000 !important;
    /* 13  */ }
    /* 14  */
    /* 15  */ .profile-item {
    /* 16  */ 	border: 2px solid #afafaf
    /* 17  */ }
    /* 18  */
    /* 19  */ .profile-item img {
    /* 20  */ 	border-radius:20px; -webkit-box-shadow: 10px 10px 15px 0 #6905FF;
    /* 21  */ box-shadow: 10px 10px 15px 0 #6905FF;
    /* 22  */ }
    /* 23  */
    /* 24  */
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @magestyx

    Thank you for reaching out and I am happy to assist you with this.

    I’ve checked the website URL you shared and one thing that I’ve noticed is that you have multiple duplicate rules for Cache-control and referrer policy for example with different values. This indicates that you may have some additional rules added that may be causing the conflict. And since the option Rewrite?URL?structure is using the rewrite capabilities of the server (nginx) you need to remove any duplicate rules and check for a config file in /wp-content/cache/minify/ folder.

    Also, please let me know which Minify Cache Method: you are using and what is the JS minifier and CSS minifier used at the moment.

    Check the Performance>Install in W3TC settings and check if this match you server configuration.

    Thanks!

    Thread Starter magestyx

    (@magestyx)

    (sorry – I thought I submitted this 3 days ago and it was still sitting in the browser today)

    minify cache mode: auto
    minify cache method: disk
    html minifier, js minifier, css minifier: all set to default
    (minify off completely for the moment due to the issue)

    You’re right – there were some duplicate cache-control directives. I’ve tried to clear those out now.
    (The cache checker here is showing the values correctly: https://www.giftofspeed.com/cache-checker/)
    But the point is that it all does work when the minified files are created. If no minified files are created then they simply won’t load so the page has no formatting regardless of how the browser caching/expiring times are set.
    I’ve looked in the /cache/objects and /cache/page_enhanced locations and folders and files are created in there fine as needed/expected. /cache/minify has only the default .htaccess and index.html , though.

    When going to a file using the alternative method like https://adwerx.net/?x55674&w3tc_minify=f3528.css
    Shouldn’t the content be minified? Since it’s not does that indicate that there’s something in the minifier not triggering at the last steps maybe?

    thanks.

    • This reply was modified 1 year, 4 months ago by magestyx.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @magestyx

    Thank you for your feedback.

    Are you using a HTTP2 push for minified files by any chance?

    Thanks!

    Thread Starter magestyx

    (@magestyx)

    Hi, Marko.
    We have the HTTP2 push box checked, but it always says it can’t be used with Disk Enhanced.

    We found several more sites yesterday where the minify cache was broken and so have had to disable it on them. We’re down to only 2 sites where it still works now, but since we have everything on these sites and servers configured the same we might go ahead and disable it on them as well to be on the safe side.

    We’ve looked at every error log and config we can find and there’s no explanation so far why this is happening. Really a shame as it W3 works so well besides this one big issue.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @magestyx

    Thank you for your feedback.
    This all comes down to the server configuration. And this is the main reason we cannot replicate the problem.
    I can see that the minified files are 404 and that minify is not enabled at the moment.
    S either you have some other form of caching, or the rules in your nginx.conf are causing some problems. I can still see some duplicate rules:

    Cache-Control:

    max-age=5529600, public, max-age=10367998, s-maxage=10367998

    And this is form CSS and JS files. You also have brotli compression form static files and gzip for html. Is this by intent and have you enabled this in the W3TC?

    Can you please try to disable HTTP2 push, save all setttings and purge the cache, and manually delete the /cache/minify/ folder.

    Also plese share your ngix.conf file and let me know if you are on plain nginx or nginx+Apache.

    Thanks!

    Thread Starter magestyx

    (@magestyx)

    Hi, Marko.

    1. /minify manually deleted
    2. http2 push disabled for JS & CSS minify
    3. Saved Settings & purged cache
    4. result: same issue – all JS & CSS broken in frontend. (/minify was recreated on the server automatically with the .htaccess file in it, though.)

    The duplicate cache-control rules are there for some separate testing we’re doing.

    All of these sites are using PHP 8.1.21 with PHP being run as an FPM application served by nginx. But to try to get W3 minify working, we’ve also tried them as FPM through apache.
    There is also a special nginx caching level, but we’ve tried that both off and on – no difference.
    We’ve also tried limiting what files nginx serves, like gzip for example, but regardless of that setting there is no minify.

    The nginx.conf contents is below. Every time we made changes we checked this file, and previously there was a specific /minify section at the top, but now it’s not there whether or not minify is actually on.

    Like I mentioned, this has been so difficult to troubleshoot because we have the same settings on all these different sites – same server and w3 settings – and it’s basically been random when a site stops minifying and never does again. We now have minify off on them all except 2 last ones. So at least they’re almost all acting the same at this point, but they all started off working with minify then at some point we’d do a Save Settings and Purge Cache and that was it – no more minify ever.
    We’re set to do standard updates to the remaining 2 next month so we’ll pay close attention to them if at some point they suddenly stop minifying. Currently they’re already on the same settings as the others were, though. pdcamarketing.com and bluesageconsulting.com in case you want to review them.

    Thank you.

    BEGIN W3TC Minify cache END W3TC Minify cache BEGIN W3TC Page Cache cache END W3TC Page Cache cache BEGIN W3TC Browser Cache

    location ~ .(css|htc|less|js|js2|js3|js4)$ {
    etag off;
    if_modified_since off;
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ .(html|htm|rtf|rtx|txt|xsd|xsl|xml)$ {
    etag off;
    if_modified_since off;
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ .(asf|asx|wax|wmv|wmx|avi|avif|avifs|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|_ttf|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
    etag off;
    if_modified_since off;
    try_files $uri $uri/ /index.php?$args;
    }
    add_header Referrer-Policy “no-referrer-when-downgrade”; END W3TC Browser Cache BEGIN W3TC Minify core

    set $w3tc_enc “”;
    if (-f $request_filename$w3tc_enc) {
    rewrite (.*) $1$w3tc_enc break;
    }
    rewrite ^/wp-content/cache/minify/ /index.php last; END W3TC Minify core BEGIN W3TC Page Cache core

    set $w3tc_query_string $query_string;
    if ($w3tc_query_string ~* “^(.?&|)_branch_match_id(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)_bta_c(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)_bta_tid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)_ga(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)_gl(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)_ke(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)adgroupid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)adid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)age-verified(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)ao_noptimize(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)campaignid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)campid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)cn-reloaded(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)customid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)dm_i(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)ef_id(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)epik(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)fb_action_ids(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)fb_action_types(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)fb_source(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)fbclid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)gclid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)gclsrc(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)gdffi(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)gdfms(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)gdftrk(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_acc(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_ad(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_cam(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_grp(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_kw(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_mt(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_net(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_src(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_tgt(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)hsa_ver(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)igshid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_campaign(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_cid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_content(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_group(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_keyword(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_medium(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_placement(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)matomo_source(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mc_cid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mc_eid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mkcid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mkevt(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mkrid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mkwid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)msclkid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_campaign(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_cid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_content(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_group(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_keyword(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_medium(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_placement(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)mtm_source(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pcrid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)piwik_campaign(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)piwik_keyword(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)piwik_kwd(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_campaign(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_cid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_content(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_keyword(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_kwd(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_medium(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pk_source(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)pp(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)redirect_log_mongo_id(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)redirect_mongo_id(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)ref(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)s_kwcid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)sb_referer_host(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)si(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)sscid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)toolid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)trk_contact(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)trk_module(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)trk_msg(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)trk_sid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)usqp(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_campaign(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_content(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_expid(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_id(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_medium(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_source(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ “^(.?&|)utm_term(=[^&])?(&.|)$”) { set $w3tc_query_string $1$3; } if ($w3tc_query_string ~ ^[?&]+$) { set $w3tc_query_string “”; } set $w3tc_request_uri $request_uri; if ($w3tc_request_uri ~ “^([^?]+)\?”) {
    set $w3tc_request_uri $1;
    }
    set $w3tc_rewrite 1;
    if ($request_method = POST) {
    set $w3tc_rewrite 0;
    }
    if ($w3tc_query_string != “”) {
    set $w3tc_rewrite 0;
    }
    set $w3tc_slash “”;
    if ($w3tc_request_uri ~ \/$) {
    set $w3tc_slash _slash;
    }
    if ($http_cookie ~* “(comment_author|wp-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)”) {
    set $w3tc_rewrite 0;
    }
    set $w3tc_preview “”;
    if ($http_cookie ~* “(w3tc_preview)”) {
    set $w3tc_preview _preview;
    }
    set $w3tc_ssl “”;
    if ($scheme = https) {
    set $w3tc_ssl _ssl;
    }
    if ($http_x_forwarded_proto = ‘https’) {
    set $w3tc_ssl _ssl;
    }
    set $w3tc_ext “”;
    if (-f “$document_root/wp-content/cache/page_enhanced/$http_host/$w3tc_request_uri/_index$w3tc_slash$w3tc_ssl$w3tc_preview.html”) {
    set $w3tc_ext .html;
    }
    if (-f “$document_root/wp-content/cache/page_enhanced/$http_host/$w3tc_request_uri/_index$w3tc_slash$w3tc_ssl$w3tc_preview.xml”) {
    set $w3tc_ext .xml;
    }
    if ($w3tc_ext = “”) {
    set $w3tc_rewrite 0;
    }
    if ($w3tc_rewrite = 1) {
    rewrite .* “/wp-content/cache/page_enhanced/$http_host/$w3tc_request_uri/_index$w3tc_slash$w3tc_ssl$w3tc_preview$w3tc_ext” last;
    } END W3TC Page Cache core

    • This reply was modified 1 year, 4 months ago by magestyx.
    Thread Starter magestyx

    (@magestyx)

    At last, we -FINALLY- have solved this issue.

    As mentioned, we use Apache and nginx, so we have rules/directives set in htaccess and also in the nginx configuration to set the cache-control for files.
    This block in nginx is what was conflicting or preventing W3 from creating the minified files:

    location ~* .(css|json|js)$ {
    expires 64d;
    add_header Cache-Control "public, max-age=10367998, s-maxage=10367998";
    add_header Access-Control-Allow-Origin *;
    add_header Vary "Accept-Encoding";
    log_not_found off;
    access_log off;
    etag off;
    if_modified_since off;
    add_header Pragma "public";
    }
    

    Even if the block is 100% empty, it still causes the issue. The very existence of the “location…{}” prevents any minified files being created.

    With that gone – bam – we’re back in business and W3 and the sites are working great. Whew!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Minifying breaks on sites and nothing brings it back’ is closed to new replies.