Support » Plugins » [Plugin: W3 Total Cache] .htaccess file

  • The entry that w3 total cache is adding to my .htaccess file is making the page inaccessible. Do I need this entry in there? Can I remove it? Is there a way to disable w3 from adding to .htaccess?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Don’t use disk enhanced caching method for page. Can you paste your file here?

    # BEGIN W3 Total Cache
    <IfModule mod_setenvif.c>
        SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|feed|wp-.*\.php|index\.php) [OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
        RewriteCond /var/www/html/finance/cfodailynews/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
        RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
    # END W3 Total Cache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    I don’t see anything out of the ordinary here, so I’ll need you to submit a bug submission report from the support tab of the plugin.


    I just installed w3tc today, and could only get it to work by changing

    RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]


    RewriteRule (.*) /blog/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]

    with wordpress installed in a /blog directory. Now when I look at w3tc settings in the dashboard, there’s this message:

    You’ve selected disk caching with enhanced mode however the .htaccess file is not properly configured.

    Can I ignore this message?

    Before I changed that .htaccess line, server was trying to load a file like /home/myname/blog/wp-content/w3tc/pgcache//_default_.html.gzip instead of a URL.

    Can you try the development version: and let me know if this issue persists?


    Thanks for the quick reply & a great plugin. The error is now gone. Should I keep development version for now? Incidentally, I had turned off Rewrite URL structure because css & js didn’t minify. I’ll trying turning it on, just in case that’s been fixed as well.

    PS: Rewrite URL structure still won’t work, so I turned it off. It doesn’t concern me too much anyway.

    this may or may not help, but, media temple gridservice reports different paths for the following, which has caused me problems in the past,

    pwd -p

    Also, media temple only allows php 5 commands to be executed in 2 ways,
    * via command line using the binary /usr/bin/php5
    * via apache .htaccess with AddHandler

    Is it possible that the code is running a shell command that isn’t using the correct binary? This is a shot in the dark, but, I am curious to solve this problem as well.

    Should I keep development version for now?


    I’m on MediaTemple gridservice, chopgood or anyone else, are there things I should look out for?

    I just tried the development version and now only some individual posts show up, seems totally random.
    My blog lives in a subdirectory.
    home page loads.
    Clicking individual posts from home page results in only some of them loading, the rest just hang.

    Even when I disable W3TC I can’t get to see many of the individual posts, I am hosed here, help!

    Is the issue random? What are your settings?

    General default settings on the dev version of the plugin.

    I ended up removing the plugin. My blog was superfast right after installing it less than 24 hours later it’s slow as molasses and I’m on the front page of Techmeme today which is an epic fail 🙁

    I removed the plugin it after I had to ssh into my server and remove some cache files that never disappeared when I un-installed it.

    Plus I’m on Media Temple Grid, I’m never quite sure where this slowness is from, or who to blame (besides myself) or who to ask for help.

    Is it WordPress core files, or Thesis theme, or a skin for thesis or a mangled custom_functions file or the web host or what? this kind of decision tree is why WP feels like the system was written a decade ago.

    Last night Media Temple told me my mysql server container crashed as well, compounding issues and then I found a 28-second query!

    I’ll probably just spend a few more bucks and get a DV server. No need for caching.

    Maybe I will install it on another site of mine, I simply cannot try to get the plugin working on my live site.

    It’s still an awesome plugin, don’t get me wrong, but its about 80% ready for mere mortals to install and use. Just read the statements about which htaccess files go where? That’s crazily complicated in the docs.

    Enough ranting, for me, I’ll check back in when I get a chance to try it on my other server.

    Shared hosting does not have dedicated resources. You should not expect your site to always be fast. No plugin can overcome a poorly optimized theme or plugins especially when no database caching (mysql customization) is possible.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Plugin: W3 Total Cache] .htaccess file’ is closed to new replies.