WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] W3 Total Cache isn't working at all (21 posts)

  1. pcgs51
    Member
    Posted 3 years ago #

    W3 Total Cache isn't working for my site.

    Originally I installed it before learning about changing the permissions on the wp-content folder. I uninstalled it and then followed the instructions for changing the permissions from 755 to 777 and back again after activation.

    I followed the instructions from a couple of tutorials I found. But my home page originally got 75/100 from Google's PageSpeed before and after the deployment of W3TC.

    Is there some special way I needed to purge W3TC from my site before reinstalling it? I'd really like to use W3TC but I'm out of ideas. Thanks.

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

  2. toyNN
    Member
    Posted 3 years ago #

    You havn't said what parts of W3TC you've enabled so hard to tell how the score should be affected. Page caching alone won't affect the score much and you should be able to tell from the details of the score what should be tweaked to get a better score (using a CDN, minify, browser caching, reduce http requests).

    You may want to check by doing a view source when browsing your site - look at the bottom and you should see some info about W3TC. If you don't then its not working.

    Remember to make sure your "Deploy" your settings in the W3TC admin panel.

  3. pcgs51
    Member
    Posted 3 years ago #

    Thank you so much for your reply ToyNN!

    There are so many settings I hesitated to post them all. Also, I did use the "Deploy" button. I remember because I almost missed it.

    Before I post all my settings I will let you know that I checked (as you recommended) the source and and see that the html is minified and I see the W3TC slug at the bottom. The following may be more helpful:

    My PageSpeed says this:
    High priority Leverage browser caching
    I thought I was using browser caching. But I see in the main part of the page a list of 35 image files that display "(expiration not specified)" at the end of them.

    In my W3TC General settings:

    • Browser Cache is enabled

    In W3TC Browser Cache
    Media & other files settings:

    • Set expires header: checked
      Expires header lifetime: 31536000 seconds
    • Set cache control header: checked
    • Cache Control policy: cache with validation…
    • Set entity tag (eTag): unchecked
    • Set W3 Total Cache header: checked
    • Enable HTTP (gzip) compression: checked
    • Prevent caching of objects after settings change: unchecked

    I will add the other settings if it proves necessary.

    I cannot find a place in W3TC to set a expiration length of time. So perhaps this is my problem and if I can get you to show me where to fix this you won't need to see the settings unless its in that "lifetime header" but I don't know what that means. Any ideas?

    Thanks

  4. pcgs51
    Member
    Posted 3 years ago #

    PS: I'm on shared hosting and not using a CDN.

  5. pcgs51
    Member
    Posted 3 years ago #

    Bump.

  6. toyNN
    Member
    Posted 3 years ago #

    Browser caching sounds like it might be working but just not on those image files. Are they within your site? On Page Speed if you switch to Resources it should show you if files are pulled from cache or not.

    If you think its configured correctly but still not working then you may want to take a look at your .htaccess file - I've had to manually remove the section on Browser Caching, All the stuff including and between:
    # START W3TC Browser Cache
    -
    # END W3TC Browser Cache

    and have W3TC recreate it. When you go back into the admin panel under Browser Caching will pick up its needed directives aren't there.

    Using a CDN will give the biggest score increase. If you have a lot of elements on the page and you aren't using a CDN I don't know how high the score can get, mid 80's maybe.

  7. pcgs51
    Member
    Posted 3 years ago #

    Yes the images are within my site.

    What does switch to Resources mean? How do I do that?

    At PageSpeed if I click on the link that gives me more information about "Leverage browser caching" for my site, I see this (just a few lines, there are more):

    http://handsonpaws.com/.../base.css (expiration not specified)
    http://handsonpaws.com/.../bkg-body.jpg (expiration not specified)
    http://handsonpaws.com/.../bkg-boxes-foot2.jpg (expiration not specified)
    http://handsonpaws.com/.../bkg-footer2.png (expiration not specified)
    http://handsonpaws.com/.../bkg-footer3.jpg (expiration not specified)
    http://handsonpaws.com/.../bkg-navbtn-light.png (expiration not specified)

    I opened the .htaccess at the root level of my site but there isn't anything with W3TC on it or I would have removed it as you suggested. I looked inside the directory where I have wordpress installed and don't have a .htaccess file there. I drilled down inside the 'wp-content', the 'plugins' and the 'w3-total-cache' directories. If there is a .htaccess file I cannot find it. Yes, I can see invisible files and I did open the one at the root but like I said, there is no mention of W3TC in it. Where should W3TC have created it? I now see that W3TC has a ton of directories.

    Yes using a CDN would probably help but my sites are not that big and there is no reason to shoot flies with a machine gun. I want to see how W3TC handles it first. Chances are, I simply have something messed up. Thanks for your help and I hope you can point me in the right direction.

  8. toyNN
    Member
    Posted 3 years ago #

    Well definitely sounds like Browser caching might not be enabled correctly. The .htaccess should be in your WordPress folder, though you say there is one in the root level? Is your site both accessable as WordPress and something else up in the root? This might be an issue since the re-write rules might not work correctly.

    But to confirm, in W3TC under General Settings at the very bottom make sure "Verify Rewrite Rules is checked" and of course make sure Browser Caching is enabled.

    Next go to the Browser Caching page and if the re-write rules are missing then you should see a red box with info about adding the rules to your .htaccess or allow W3TC to do so for you.

    If the correct re-write rules are not in your .htaccess W3TC should clearly tell you so.

  9. pcgs51
    Member
    Posted 3 years ago #

    I always configure my wordpress sites with the "home" page (index.php) one level above the wordpress installation directory. (Yes, I follow the Codex "Moving WordPress" instructions.) No, my site is not accessible as anything else at the root.

    There is no .htaccess file in the wordpress directory and the one that I see above it (at the root) contains only this:

    `
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress`

    I checked the W3TC General Settings and yes, both "Verify rewrite rules" and "Browser cache" on that page are enabled. I also see this message at the top: "Browser caching is currently enabled."

    Also, the Browser Caching page/section. I see no red box or mention of re-write rules but then I find NO .htaccess file anywhere on my site. I do see mention of W3TC in my wp-config.php file.

    This is driving me bonkers. I would consider completely uninstalling if I could find instructions I could trust. Then I would try to reinstall it all over again. If I cannot see any improvement I see no reason to use W3TC. I also can't believe it won't help once the problem is found.

    This isn't my site, its a clients and I was attempting to do a favor and hoped to learn more WordPress skills in the adventure. I'm stuck and not sure what to do. This has become the favor from you-know-where.

    I appreciate your kind help and hope you will continue to help me through this. Thanks.

  10. toyNN
    Member
    Posted 3 years ago #

    I would look under the Install section of W3TC and it should list what's needed in your .htaccess rewrite rules (it will be very long). You may need to copy and edit these into your root level .htaccess

    I've not done an installation of WP as you describe - don't know if its an issue or not but if no .htaccess file exists within the WP folder W3TC might have difficulties with the setup so manually editing the root level .htaccess may be needed.

  11. pcgs51
    Member
    Posted 3 years ago #

    Keeping wordpress in a separate directory and moving the index.php file is a common practice you can see it here <http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory>. Often times its recommended, commonplace and very doubtful this is the problem.

    I returned to the W3TC Installation page <http://wordpress.org/extend/plugins/w3-total-cache/installation/> it does not display the re-write rules (I even did a 'find' for the word, "write" with no luck). I looked in the FAQ and Other Notes tabs too.

    Okay, now I at least know that whatever I am missing belongs in the .htaccess file at the root. But I need to see the rules so I can copy>paste them into the .htaccess.

    Thanks.

  12. toyNN
    Member
    Posted 3 years ago #

    Sorry you're looking in the wrong place, in your WP admin panel, under the W3TC "Performance" admin menus you'll see and Install selection towards the the bottom. Open up this options screen and scroll down to get the rewrite rules.

  13. pcgs51
    Member
    Posted 3 years ago #

    SILLY me! Its just that I've been to the plugins page reading and re-reading hoping to find a hint.

    Okay I see the one for the root .htaccess. I even see some "ExpiresByType" rules. Copied them, pasted into the root .htaccess file, logged out and went to PageSpeed for another test.

    NOW we made some progress! I see that the list of images needing expiration dates has been shortened by about half and the score went from 75 to 85, thanks!

    I also see re-write rules for the .htaccess located here: wp-content/w3tc/min/.htaccess AND for wp-content/w3tc/pgcache/.htaccess . But those rules are in place. So those two are handled.

    Well toyNN, I sure would like to know why the 18 remaining images do not have expiration dates. You can see the report here.

    I will understand if you are tired of this issue and I thank you for helping me through this difficult situation. But I still want to understand W3TC so I can use it on other sites. Thanks again!

  14. toyNN
    Member
    Posted 3 years ago #

    Sounds like you are getting closer.

    I'm using PageSpeed that is a plugin for Firefox, its integrated with Firebug (also a FireFox plugin). This way I can drill down a bit more on what is happening. This is where the "Resources" tab I mentioned previously is found. It will show info about each file download as part of the page, if it was cached, etc...

    When I hit your site the score is better but seeing many of the files not cached. You may need to deploy or do a page cache purge for accurate testing.

  15. pcgs51
    Member
    Posted 3 years ago #

    Yes, it is much better thanks to you! I will mark this as resolved soon but am hoping for more results and figure I shouldn't change this threads status just yet.

    Grabbing the PageSpeed plugin shortly (have and use FireBug).

    How does one "re-deploy" W3TC? The 'Deploy' button was only offered to me the one time and I haven't seen it since. If I turn off W3TC will that button return? I tried turning off other plugins earlier today and see that when I do anything to my site, that W3TC offers the opportunity to 'purge cache.' Which I do.

  16. toyNN
    Member
    Posted 3 years ago #

    If you've disabled W3TC Preview mode then Deploy happens automatically, if Preview mode is active the any change will cause the Deploy button to be shown (tweak a W3TC setting, add a plugin, etc...). Deploy basically purges the page cache.

    Preview mode is toggled under the General Settings of W3TC. Just personal preference mostly on how you like it set. But if I'm making a number of changes some times I don't want the page cache being purged constantly - nice to have some control over when it happens - of course I've got to remember to do so too.

  17. pcgs51
    Member
    Posted 3 years ago #

    Installed the PageSpeed plugin to Firebug. Now I see several files that don't seem to have caching on other parent pages. The home page has a few uncached but not as many as the other pages. However, the home page is rating 88 and the other pages are now at 90. So that's pretty good.

    I don't know what it means to have the page cache purged constantly. Are you referring to turning the Preview on or off or W3TC on or off?

    Thanks.

  18. toyNN
    Member
    Posted 3 years ago #

    Excellent, might be hard to get much higher without setting up a CDN.

    So cache purging question...You have Page Caching enabled right? So W3TC is building your site's pages and storing them (most likely) to disk on your server. If you ftp into your site look under \wp-content\w3tc\pgcache\ and see these files.

    When W3TC senses there's been a change it will purge (delete) the pgcache\ of all files so folks hitting your site get pages the reflect the changes you made. Then as page requests come in new cached versions are created and as other folks hit your site they'll get served the newly cached version of the page.

    Changes that can trigger this are like every time you do a Save Settings in W3TC, or add/change a plugin, make a new post, someone adds a comment....just for example.

  19. pcgs51
    Member
    Posted 3 years ago #

    I'm pretty happy with these numbers, but I bet there is still some room to improve without going to a CDN just yet.

    Yes, I have Page Caching on:

    Checked: Don't cache pages for logged in users
    Checked: Cache home page
    Checked: Cache feeds…
    Unchecked: Cache URIs with query string variables
    Unchecked: Cache 404 (not found) pages

    I FTPed to that pgcache directory and do see how there are now files there. Previously I've seen it empty.

    Okay, I get it (sort of) now. Do I need to Enable the Preview Mode to edit the site from here on out? Like updating plugins, or editing content on a page?

  20. toyNN
    Member
    Posted 3 years ago #

    Ok sounds good. and no Preview mode doesn't need to be set - if Preview mode is off then W3TC will just purge the cache automatically as needed.

  21. pcgs51
    Member
    Posted 3 years ago #

    Thanks so much toyNN! I have no idea what I would have done without your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic