Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] Enabling page cache causes WSOD

  • No matter what config changes I make, every time I enable page cache, the page loads the next time I refresh the page (on a browser session where I’m not logged into WP), but the next time I refresh, i get a blank page, and there’s literally nothing in view source. If I clear all caches (from the dashboard) I can get the page to load after one refresh, but the next refreshes are once again a white screen.

    I’m on hostgator with a shared hosting plan. Disk basic is the page cache method. Previously, when I had “disk enhanced” enabled, I would get a 500 server error. Just for giggles, I tried setting it to disk enhanced again and saved settings, now I keep getting this message at the top:
    “Preview mode is active: Changed settings will not take effect until preview mode is [deploy], [disable] or [preview]”

    The preview looks fine, but if I click deploy, it just refreshes the screen with that same message, like it can’t deploy for some reason.
    I have wp_content set to 755 permissions as is the w3tc folder under it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I just noticed this in my error_log:
    Call to undefined function w3_url_format() in /wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php

    OK, here’s the debug info:

    <!– W3 Total Cache: Page cache debug info:

    Engine: disk: basic

    Cache key: *************_gzip
    Caching: enabled
    Status: not cached
    Creation Time: 2.008s
    Header info:
    Set-Cookie: woocommerce_items_in_cart=1; path=/
    Last-Modified: Fri, 15 Jun 2012 19:53:12 GMT
    Vary: Accept-Encoding, Cookie
    Expires: Fri, 15 Jun 2012 20:53:12 GMT
    Pragma: public
    Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
    Etag: d0592325f06b94b87bdfb21b6f8e004d
    X-Powered-By: W3 Total Cache/
    Content-Encoding: gzip
    Content-Type: text/html; charset=UTF-8

    I’ve been banging my head against the wall over this all day. I tried using WP Super Cache, although it doesn’t appear to do anything for browser caching, not to mention the fact that for some reason, no matter what the configuration, it would never load the footer.

    I’ve reinstalled w3tc numerous times, and at this point, I have page caching disabled and I’m using quick cache for page caching. My site loads in just over 1 second. I’d like to get w3tc working, though.

    Plugin Author Frederick Townes


    You need to add require_once W3TC_INC_DIR . ‘/functions/url.php’; in lib/W3/Plugin/PgCacheAdmin.php on the line after require_once W3TC_LIB_W3_DIR . ‘/Plugin.php’;

    Also Disc Enhanced does not work with the WooCommerce plugin so you need to use another cache engine after making the formentioned change.

    Please submit a bug submission form from the support tab of the plugin if you have more issues.

    Got it, thanks!

    Also, does w3 cache support page-level pruning? Like, when I make an update to a page or post (or some other post type), can it automatically refresh the page cache without having to reload the entire page cache? I found this feature of quick cache to be very useful.

    Plugin Author Frederick Townes


    Yes, if you browse the pages in pages or posts sections and hover the items to see the utility actions.

    the above code change didn’t fix the issue, and I recently discovered that while using Quick Cache for page caching did speed up the load time of my site, there was still a pretty heavy load on the server as though the sql queries and php scripts were executing, so I spoke with a server admin at my web host and discovered the problem:

    The following line is what was causing the issues:
    # RewriteCond %{HTTP_USER_AGENT} (240×320|2\.0\ mmp|\bppc\b|acer\ s100|alcatel|amoi|android|android 4.0.3) [NC]
    As this is supposed to be considered a single string, spaces must be escaped, however, there’s a \ missing in the end between “android 4.0.3”. This led to the error message:
    [Wed Sep 26 12:33:45 2012] [alert] [client] /public_html/dev/.htaccess: RewriteCond: bad flag delimiters
    as apache thought “4.0.3)” was one of the rewritecond flags, which it didn’t know how to interpret.

    My site is now loading correctly with that line changed to:
    RewriteCond %{HTTP_USER_AGENT} (240×320|2\.0\ mmp|\bppc\b|acer\ s100|alcatel|amoi|android|android\ 4.0.3) [NC]

    oh, and while the site does load, page caching is not working.
    Page caching shows as enabled in the dashboard, but with debugging on, I get this in the footer:
    (note, there are no mfunc or mclude tags on any pages)

    Minified using disk: basic
    Content Delivery Network via Amazon Web Services: CloudFront:
    Served from: @ 2012-09-26 16:25:11 -->
    <!-- W3 Total Cache: Page cache debug info:
    Engine:             disk: enhanced
    Cache key:          shop/product-category/subwoofers/_index.html
    Caching:            disabled
    Reject reason:      Page contains dynamic tags (mfunc or mclude) can not be cached in enhanced mode
    Status:             not cached
    Creation Time:      1.205s
    Header info:
    Expires:            Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control:      no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma:             no-cache
    Set-Cookie:         woocommerce_items_in_cart=0; expires=Wed, 26-Sep-2012 19:25:11 GMT; path=/;
    Content-Type:       text/html; charset=UTF-8

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: W3 Total Cache] Enabling page cache causes WSOD’ is closed to new replies.