WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] .htaccess file (25 posts)

  1. danieltko
    Member
    Posted 4 years ago #

    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?

  2. Frederick Townes
    Member
    Posted 4 years ago #

    Don't use disk enhanced caching method for page. Can you paste your file here?

  3. danieltko
    Member
    Posted 4 years ago #

    # BEGIN W3 Total Cache
    <IfModule mod_setenvif.c>
        SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
    </IfModule>
    <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]
    </IfModule>
    # 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]
    </IfModule>
    
    # END WordPress
  4. Frederick Townes
    Member
    Posted 4 years ago #

    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.

  5. yitwail
    Member
    Posted 4 years ago #

    frederick,

    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]

    to

    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.

  6. Frederick Townes
    Member
    Posted 4 years ago #

    Can you try the development version: http://wordpress.org/extend/plugins/w3-total-cache/download/ and let me know if this issue persists?

  7. yitwail
    Member
    Posted 4 years ago #

    Frederick,

    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.

  8. yitwail
    Member
    Posted 4 years ago #

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

  9. chopgood
    Member
    Posted 4 years ago #

    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
    /home/93518/users/.home/example.com/html/
    
    pwd -p
    /nfs/c06/h01/mnt/93518/domains/example.com/html/
  10. chopgood
    Member
    Posted 4 years ago #

    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.

  11. Frederick Townes
    Member
    Posted 4 years ago #

    Should I keep development version for now?

    Yes.

  12. relaxedguy
    Member
    Posted 4 years ago #

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

  13. relaxedguy
    Member
    Posted 4 years ago #

    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!

  14. Frederick Townes
    Member
    Posted 4 years ago #

    Is the issue random? What are your settings?

  15. relaxedguy
    Member
    Posted 4 years ago #

    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.

  16. Frederick Townes
    Member
    Posted 4 years ago #

    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.

  17. Sreejesh
    Member
    Posted 4 years ago #

    @ fredericktownes Hi Frederick I blog @ techGyo.com I've read a lot about W3 Total Cache and I tried to install it in my blog. It was not a fresh install, because I've been using Super cache so far. I uninstalled and deleted super cache before installing W3 Total Cache, but I couldn't actiavate the plugin.

    I'm getting error message:
    ------------------------------------------

    Plugin could not be activated because it triggered a fatal error.

    /home/techgyoc/public_html/.htaccess is not write-able, please run following command:
    chmod 777 /home/techgyoc/public_html/.htaccess

    ------------------------------------------

    So I went to Cpanel and changed folder permission and tried again. But it is still giving me the same error message while trying to activate.

    Can you please advice the steps to be taken when installing W3 Total Cache on a wordpress which already had a cache plugin? and also please advice the changes to be made to .htaccess file.

  18. Inv_Trdr
    Member
    Posted 4 years ago #

    You will need to start all over again. Delete the W3 plugin completely along with any files or scripts it created. Then change the permission first before you even download it.
    Good luck.

  19. Sreejesh
    Member
    Posted 4 years ago #

    Thanks for the tip, But I'm sorry the issue still persists.

    I think there was some major issue occurred in the previous installation.

  20. Frederick Townes
    Member
    Posted 4 years ago #

    The error message was about your .htaccess file, not a folder. Also I recommend trying the development version of the plugin instead: http://wordpress.org/extend/plugins/w3-total-cache/download/

  21. Sreejesh
    Member
    Posted 4 years ago #

    Thanks for the quick response! Let me try the development version and keep you updated with the result

  22. Sreejesh
    Member
    Posted 4 years ago #

    Hmmm.. Still getting the same error:

    Plugin could not be activated because it triggered a fatal error.

    /home/techgyoc/public_html/.htaccess is not write-able, please run following command:
    chmod 777 /home/techgyoc/public_html/.htaccess

  23. Frederick Townes
    Member
    Posted 4 years ago #

    Change permissions on file chmod 777 /home/techgyoc/public_html/.htaccess
    but not on directory /home/techgyoc/public_html/

  24. Sreejesh
    Member
    Posted 4 years ago #

    @ fredericktownes It works like charm!! My blog is much faster that ever before!! I'm really thankful to all guys who suppoted me to get this thing work in my blog!

  25. Frederick Townes
    Member
    Posted 4 years ago #

    Very good @srj.cooldude

Topic Closed

This topic has been closed to new replies.

About this Topic