[Plugin: WP Super Cache] Only caching feeds, not regular pages
-
Installed wp-super-cache and it seems to be working fine, except that it is only caching feeds and not content pages (that is, the content pages, but with urls ending in /feed/).
Any idea what might be causing this?
I checked the .htaccess files and everything looks to be in order. Any other places I should be looking?
Thanks for your help.
-
Have you tried half-on mode? Does that help?
Is your blog installed in a sub-directory?
Thanks donncha – just switched to half-on mode, i’ll see if that makes a difference and let you know. It isn’t installed in a subdirectory, so I don’t think that’s likely to be the issue.
I’m having the same issue with https://mmaopinion.com
Super-cache won’t work and regular caching is just URL’s ending in /feed/…I have a decent number of visitors, so people are viewing the site.
I’m confused too.
ensignkid – have you updated the .htaccess rules? Delete them between the SuperCache BEGIN and END tags, then reload the admin page and look for the mod_rewrite rules section. There’s a button there to add them again.
Your blog is setting the wordpress_test_cookie cookie and the old rules exclude browsers with that set. Use the debug logging functions too.
tried the half-on mode, same problem. Here is what the .htaccess contains…let me know what you think. This site is on dreamhost, ensignkid, what host are you using?
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240×320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240×320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule>
# END WPSuperCache# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Have you tried the debug settings? That will tell you a *lot* about why a page isn’t being cached. Limit it to your own IP and crank up the debug level to 5. Then visit your blog and examine the log file.
Hi Donncha, same problem here – anything ending in /feed/ appears to cache ok, but normal pages are not cached at all. My wordpress installation IS in a sub-directory, with the index.php just above, in the site’s root:
Site is:
https://2dboy.comwordpress is secretly here:
https://2dboy.com/blog/The .htaccess files have been written, etc. Does WP Super Cache not work if the blog is in a sub-directory?
twodboy – it should work. Can you paste your WPSuperCache rules here? Are cache files created? I presume they’re created in blog/wp-content/cache/ ?
Have you tried half-on mode? Feeds are not cached by supercache static files but by “half on” cache files which leads me to think it’s the rewrite rules.
btw – I’m a big fan of “World of Goo”, love that my purchase bought the Mac *and* Linux versions.
Thanks! And looks like we got slashdotted a couple hours ago! I’ll paste the rewrite rules below. Half-on mode doesn’t appear to change anything – still just the feeds being cached.
There are a bunch of wp-cache-*.html files in /blog/wp-content/cache/ as well as a ./blogs/ and ./meta/ directories, but I do not see a ./supercache/ directory in there at all. Should there be?
Here is .htaccess from /
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240×320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240×320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule># END WPSuperCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
And here is the .htaccess from /blog/wp-content/cache/
# BEGIN supercache
<IfModule mod_mime.c>
<FilesMatch “\.html\.gz$”>
ForceType text/html
FileETag None
</FilesMatch>
AddEncoding gzip .gz
AddType text/html .gz
</IfModule>
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI \.gz$ no-gzip
</IfModule>
<IfModule mod_headers.c>
Header set Vary “Accept-Encoding, Cookie”
Header set Cache-Control ‘max-age=300, must-revalidate’
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html A300
</IfModule># END supercache
Thanks for your help!
What plugins are you using? One of them could be abusing the output buffer. I found that wp-minify was and fixed it. The plugin would cache /feed/ urls and nothing else while the output buffer was corrupted.
Your rewrite rules look ok though. Grep for ob_ in your plugins folders. One of those plugins might be dodgy.
The following plugins use the output buffer but are ok, no need to worry about these: all-in-one-seo-pack, falbum, akismet, related-posts.php, wordpress-mobile-edition.
The current wp-minify breaks the output buffer but the next version will be fixed.
Interesting. I’m using akismet and Firestats. I just disabled Firestats, and tested again, but the behavior has not changed.
We don’t do anything very advanced with our server (it’s dedicated) or website, and I assume all our server settings are boring and ordinary, so it’s strange this doesn’t seem to work for us. Let me know if there is anything else I can look up and post here for you.
I Installed WordPress in a /blog/ directory on https://cuteandinsane.com/ and Sueprcache is working ok there. The .htaccess rules are the same and cache files are generated in blog/wp-content/cache/supercache/
Could your theme be using an output buffer? Any commands starting with ob_ in the theme files?
I like that domain name ?? Nope, “ob_” doesn’t appear in any of the files in the theme’s directory. It’s a theme I made many wordpress versions ago (maybe two years ago?) and I wonder if themes have changed since then?
In any case, thanks for the help!
Not sure what to suggest then. You could look through the troubleshooting section in the readme.txt but what you describe is an output buffer problem from my experience. Sorry I can’t help more.
Don’t know if its any help, but my website wasn’t caching, I used the debug tool and it showed image urls that didn’t exist. I had them in my css and had deleted the images. when I deleted the code from the css more files cache.
- The topic ‘[Plugin: WP Super Cache] Only caching feeds, not regular pages’ is closed to new replies.