Hyper Cache

Hyper Cache is a lite, simple to configure and highly performant cache plugin for WordPress.

Hyper Cache is a cache system for WordPress. I wrote it because my hosting provider was very low in resources, particularly on the MySql side. Hyper Cache solved all my performance problems. It probably can solve yours as well!

The aim of Hyper Cache is to be efficient but easy to configure. It has a simple configuration panel with preset values ready for your blog. You can tweak the configuration to improve even more the performances or to address specific needs.

It is bbPress ready: Hyper cache is able to detect new topics and replies and refresh the forum cached pages.

Migration from 2.x to 3.x

Since the option panel has been rewritten, I added an import button to automatically migrates the original 2.x options to the new 3.x options. Migration related issues can be reported on the dedicated forum.

Support

Please use the forum to ask for support, thank you an read the F.A.Q. below.

How to detect if it is working

Use a clean browser (not the one you use to administer your blog or open a new browser window in anonymous mode), and load the same page a couple of times. Look at the page source and at bottom you should see the Hyper Cache signature.

Another way is to use a browser developer tool and look at the network panel: the response header for a cached page should contains the specific “X-Hyper-Cache” header with value “hit” or “hit-mobile”.

Hyper Cache main features

  • easy installation: just activate Hyper Cache and it works with a set of default values
  • easy configuration: you can just ignore the configuration panel (even if enabling the compression is a good idea!)
  • mobile cache: separated cache for mobile devices (when you use mobile oriented themes or plugins)
  • theme switch for mobile devices
  • compression support to optimize your bandwidth usage and the overall page load speed (important with mobile devices)
  • configurable bypass (when the cache should not… cache): by page address, user agent, cookies, feeds and so on
  • 404 caching
  • bbPress ready: can cache and refresh bbPress pages
  • special refresh options
  • configurable caching only of the newest posts

Download and Installation

Download it from the WordPress Plugin Repository or search for “Hyper Cache” in your blog plugin panel. Once activate, go to the configuration panel and follow the instructions.

Usually you need wo add a lince of code in the wp-config.php file just after the define(‘WPLANG’, ‘xx_YY’):

If that definition is already present in your wp-config.php file, modify it as shown above.

The plugin options are explained inside the configuration panel, here you can find some deeper concept or annotations.

Configuration

Cached pages will be valid for…

It’s a time in hours used to consider still valid an already cached page. If a page is in cache but older than the specified number of hour, it is not considered and regenerated.

Cache folder

Usually you should leave this option empty to use it’s default value (auto computed by Hyper Cache). The cache folder where cached pages are store is locate at wp-content/cache/hyper-cache. You can specify an absolute path lo move it but pay attention: is you wrongly point the cache folder to an existing folder with files, on cache refresh they can be deleted.

Compression

Compression should be enabled for two reason:

  1. save a bit of bandwidth (mostly of the bandwidth is used for images and not for the text part of a page…)
  2. serve the content as quickly as possible to make the user experience better

More, if you have a mainly textual blog, you’ll save traffic on the client side, which is very good for mobile user with expensive data plans.

If you note strange characters instead of the regular page when the compression is enabled, it means your server is already compressing the pages on the fly. Seen that a cached compressed page is much more efficient than compressing the page on the fly, you should configure the server to not compress the html and xml mime types (but let it compress JavaScript and CSS).

Browser caching

When the browser caching is enabled, Hyper Cache tells browsers to keep a copy of the page in their cache and to not request the page again (until it expires).

The expiration time can be set in hours in the option panel or it will be computed as the time remaining for the page in your blog cache. For example, if the page has been cached 1 hour ago and your cache timeout is set to 24 hours, the browser will receive the suggestion to keep the page for 23 hours.

Pay attention: I usually keep this option off because if you change something of important in your blog, regular users will see always the already visited pages and cached in their browser. Only a forced reload will refresh the local user cache but not all web users know about it.

Bypasses

Hyper Cache can be configured to totally ignore some type of pages. For example you may want to not cache the home page to have it always fresh or the feeds to save disk space since they are rarely requested. Remember that WordPress has a feed for each post…

Other bypass are based on matching rules: for example if you have a forum installed which pages live under the URL “/forums” (actually it’s more correct to call the URIs), to never cache such pages add “/forums” to the “starting with URIs to bypass”.

Other bypasses are per user agent, cookie name or exact URI.

URI matching

The URI is the part of a site page address without the domain name. For example this page address is

http://www.satollo.net/plugins/hyper-cache

the URI is “/plugins/hyper-cache” with a starting “/”. So if I want to NOT cache this page I need to specify “/plugins/hyper-cache” as URI to bypass.

If there are more than a URI to exclude just insert one per line. Remember: the URI is the full piece after the domain name. If your blog is installed under a path like:

http://www.satollo.net/blog/plugins/hyper-cache

to exclude that page you must use as URI the value “/blog/plugins/hyper-cache”.

For the “starting with” URI matching the same considerations apply.

The special case of comment authors

When a user leaves a comment in your blog, WordPress uses some cookies to store his data and fill the comment for fields with his name, email and site, The cache must take care of that, to avoid serving a page with those fields filled with another user data.

So, most of the caches simple disable them self when a visitor has those comment cookies. Hyper Cache is able to manage that situation and serve cached pages to comment authors visiting the blog, still pre-filling the comment fields with the visitor’s data.

This is done injecting a little JavaScript on single post. To disable that injection, just disable the serving of cached page to comment authors.

Mobile

If your blog is serving different content and or a different theme to mobile devices, you must consider to have a double cache, one for the desktop content/theme and one for the mobile content/theme.

Mobile detection must be enabled and the user agents set compatibly to the ones used by other plugin/themes. Hyper Cache must be able to decide to serve the desktop or mobile version on its own, otherwise the cache benefit will be lost.

Hyper Cache can be configure to activate a different theme  when it detect a mobile device: it’s a simple integrated theme switcher.

A use case. I use Header and Footer to inject different ads formats for mobile devices, even if the theme does not change (it’s responsive). I have Header and Footer detecting the mobile devices in the same fashion than Hyper Cache so pages are cache with different ads code for desktop and mobile visitors.

Unluckily there is no a standard in WordPress so a detection system can be used initially and make all the plugin use it…

F.A.Q.

My cart widget does not work anymore. Do not use the cache or look at a widget configuration which let it to be loaded via AJAX.

My statistic plugin is no more working. Hyper Cache, when possible, serves directly a page without activate WordPress (and hence the installed plugins).

The cache folder is missing. Create it manually wp-content/cache/hyper-cache. For security reason some blogs have a write lock on wp-content folder.

I found no file in the cache folder. Try to set it to 777 permission level: for some reasons and on some providers Hyper Cache cannot write in that directory.

Why have I to use Hyper Cache and not other cache systems? I really cannot answer that question: Hyper Cache is free as for other cache plugin… take the one which gives more performances to your blog!

Where are the cache pages? In to the folder /wp-content/cache/hyper-cache: if you empty that directory the cache starts from zero. Do not delete the directory!

Why there is a JavaScript added at the end of cached pages?

It’s to pre-fill the comment fields even on cached pages. To disable it disable the serving of cached pages to comment authors.

 

This page, even if not complete, collects come configuration tips for Hyper Cache. If you have questions, please write me at <a href=”mailto:info@satollo.com”>info@satollo.com</a>.
<ul>
<li><a href=”#expiration-time”>Expiration time</a></li>
<li><a href=”#invalidation-methods”>Invalidation methods</a></li>
<li><a href=”#uri-rejection”>URI rejection</a></li>
<li><a href=”#faq”>Frequently Asked Questions</a></li>
</ul>
If you choosed to use Hyper Cache and are satisfied do a check of the advantages or the money saving it brings to you and consider to donate something: that will help me to continue the Hyper Cache developement.  <a href=”https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2595746″><img class=”alignnone” title=”Donate” src=”/english/images/paypal.gif” alt=”” width=”92″ height=”26″ /></a> Thank you!  <a name=”expiration-time”></a>
<h2>Expiration time</h2>
<strong>What means “expire a cached page after X minutes” and what’s the best value?</strong> Hyper Cache stores an html page in it’s repository. On each reaquest for a page, Hyper Cache checks how much old that page is. If the cached page is older than the X time (in minutes) specified, that page is not served by Hyper Cache, but “re-created” by WordPress (like if a cache system was not here). Hyper Cache then restores the generated page.  I use 1440 minutes for my pages (one day), but remeber that a page can be cleared on special events (like comment or modification by the blog owner). You can specify a zero value to avoid any kind of cache expiration.  Why it’s better to expire a page (even with a long time)? Because a page is not only the article text, but there are other information, like categories list with posts numbers, latest comment list, latest posts list and so on. With new content, new comments, those lists becomes “old”.  <a name=”invalidation-methods”></a>
<h2>Invalidation methods, what’s the best?</h2>
There is not a best method, it all depends on your needs.  <strong>Method “all”</strong>. If you need a really coherent and updated blog, you can choose the method “all”: each action on posts (eg. edit), new comment submission and so on leads to a complete cache invalidation. But it’s the more expensive (for your blog, not for the cache).  Remember that Hyper Cache (at now) doesn’t intercept the blogroll modification or the theme change. For the latter there are good reasons. So if you plan to make big modification to the blog, manually invalidate the cache.  <strong>Method “single page”</strong>. With this method, Hyper Cache invalidate only the cached page of a post modified (with the editor or when a new comment is added to it). The home page is invalidated too just to keep it coherent. But all the cache will be cleared if a post change it’s status from unpublished to published or from published to unpublished. That behaviour keeps all the blog pages updated (no links to article no more active or missing links to article just published).  <strong>Method “single page strictly”</strong>. I was asked to invalidate only and only tha cache page of a post when it is modified (even for a status change as explained), because there was no interest on having all the page perfectly updated.  <strong>Method “none”</strong>. The cache is never invalidated whatever action will be made (new comments, new posts, editing, and so on). This method can be good if you do very little modification to your blog. Obviously tha cache still respects the expiration time.  <a name=”uri-rejection”></a>
<h2>URI rejection and matching criteria</h2>
There are times when a page or a post has to be served always from WordPress. Given the URI (URI is the right word) of that post, it can be added to the url to reject textarea.  Let’s go with an example. You have a special page that has not to be cache, let it to be under the URI “/special-page”. So, enter that URI in the textarea <strong>without</strong> quotes. The matching criteria is “if the current URI <strong>starts</strong> with one of the specified, just skip the caching system”.  Read the criteria, you can use the partial URI “/special” and the special page will be still rejected.  <strong>What about if I need to reject a page with URI “/special” but cache the page with URI “/special-page”?</strong> Simply write the URI to reject surrounded <strong>with</strong> double quotes: “/special”. Hyper Cache will match exactly that page.  <a name=”faq”></a>
<h2>FAQ</h2>
<strong>The options panel is saying my installation has problems!</strong> Deactivate and reactivate the plugin: some files need to be rewritten. Then **re-save** the configuration even if you didn’t make changes.  <strong>Why have I to use Hyper Cache and not other cache systems?</strong> I really cannot answer that question, but I wrote Hyper Cache to have an easly to install and crontrol cache system for WordPress that make me happy with a 4000 page views/day blog and a 12$/year hosting provider. Enough?  <strong>Where are the cache pages?</strong> In to the folder /wp-content/hyper-cache: if you empty that directory the cache starts from zero.  <strong>Why have I to donate? And how?</strong> There is chances that if you are using Hyper Cache you are saving a lot of money keeping you site in a cheap provider. This can be a reason. Or just because you find me a cool programmer and want me to keep in developing Hyper Cache and eating two times a day :-). Or…  <a href=”https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2595746″><img class=”alignnone” title=”Donate” src=”/english/images/paypal.gif” alt=”” width=”92″ height=”26″ /></a> Thank you!

219 thoughts on “Hyper Cache

  1. Should the message go away once I do this?
    You must add to the file wp-config.php (after the define(‘WPLANG’, ”);) the line of code: define(‘WP_CACHE’, true);.

    I updated my wp-config file and still see the message. And I am unable to verify if it’s working on my site.

  2. Hey, is there any way to invalidate a single post if a new comment is added? At the moment, a comment will only shop up once the cached post has expired or if I clean the cache manually

      1. So the problem isn’t with hypercache, it’s with the fact that the site in question uses a pair of load balanced web servers that don’t share storage – ie they each have their own hypercache created wp-content/cache folder.

        So, one server (the one the user connected to when leaving the comment) was invalidating the page (I assume by deleting it from the cache folder), but the other server wasn’t and displaying the old page.

        Don’t think there’s much you can do about this, – but this might be useful in case anyone else experiences the same problem. Thanks for your reply, anyway.

        1. The only thing that can be done is a intra caches communication… It’s a thing that can be developed easy (I did it on other systems). There are no other solutions I think…

    1. Browser caching has nothing to do with my plugin, which caches page at server side. Try to enable the browser caching in the options panel: that sends a commend to the browser to keep the pages in its local cache. Pay attention, that means users can get and keep old pages until the browser decide to reload them. More, check the notice you have from gtmetrix: on which resources it says to enable the browser caching?

  3. Hi there,

    is it possible to clear the cache with a real cronjob? Cause I need to clear the cache at a certain time eg. 1am… How can I do this with hypercache?

    1. I was thinking something similar, but then I realised that if a page has expired it will get rebuilt when that page is next visited, and I can’t see any harm in leaving the expired pages there, as they will get replaced when the time comes.

      If you don’t actually need to delete them, it might be simpler to just leave them be.

      1. Thanks for your reply. Let me describe my case:

        – no comments or something similiar on the site
        But my problem is the self build upcoming events widget on every page. The cache only needs to be cleared when an event is over or when a post/page/cpt changes. But this widget is just a query so it is not able to start the cache rebuild.

        So in some cases, if a page is cached before midnight it shows an “old upcoming event” until the cache expired. And I dont want to set the expire time to 4 or 6 hours to keep them nearly fresh all the time. Best for me, cache 24 hours, clear cache at midnight so every page shows the correct upcoming events.

        Sorry for my english ;)

  4. Our server is horribly slow with WordPress, but Hyper-cache serves up cached pages almost instantly.

    One problem though, in the footer of our pages we have a Twitter feed that shows how many minutes ago each tweet was posted. On cached pages the time does not change and new tweets do not show. The option to “cache feeds” is not set. Is there a way to get feeds like Twitter/Facebook to refresh on a cached page?

    Our site home page is http://www.drapertools.com/news/ if you have time to look and can see if anything is configured incorrectly.

    Our feeds do not usually update fast, so if this can’t be fixed I could set the cache to expire after 30 minutes, but because posts are not expected to change often I was going to set this to 4 hours.

    1. It’s ok, I found the problem!

      The widget our theme uses to add the Twitter Feed to the page Footer is just outputting the HTML for the tweets at the time the page is loaded. There is no script to refresh it, so the caching works perfectly. I will need to make pages expire more frequently.

  5. Hi, Stefano :
    my website is using hyper-cache. but i have a question.
    could i delete one posts from my hyper-cache ??(because there are 1000+ people on my site. if i delete all cache, the website will be broken.)

    i try to find the post hyper-cache number. i into the /wp-content/hyper-cache/cache and delete the file.
    but it dosen’t work. so please help me to delete one post cache (another methods).

    1. My pugin work as is, probably that is another plugin that can be helpful I don’t know. About the error you have I don’t know, I don’t use that library of php on my plugin. Does the error disappears if you disable my plugin?

  6. This plugin is really good. I use it with SwarmCDN and it works without problem – my website loads under 1sec (before over 4sec). I have some ideas how to improve this plugin, maybe some of them would be added in future releases. There is a list:

    1) RSS caching
    2) Add clear link into admin bar (I know, there is a plugin for this, but it would be nice to add this to Hyper cache plugin)
    3) Schedule cache purge – add scheduler
    4) Cache only new content (older post are not cached anymore) – I like this feature from Lite cache
    5) Show total space of cached files in the settings (next to the page cached)
    6) Is https/http combination supported?

    Thank you again, I am looking for new version ;)

  7. First: great plugin, love this.

    I was wondering though; is it possible to do some sort of hole punching? In other words, not caching specific parts of a page?

    Cheers

    Kevin

    1. No it’s not possible, since the plugin cache the generated HTML. Other plugins have some tricks to not cache part of the page, but I don’t know how they work and more, is that require to load the WP core system, it’s like to not have the cache…

    1. Hi, my plugin DOES not inject any code, any coder can verify it just downloading the plugin source from wordpress.org. So I suggest you to really check you blog for other kind of hacks. Really.

      More, please instead of state that the plugin injects something (it’s so used and from so much time that this problem would be reported time ago), let me, if you want, to help you in finding the problem.

      The furst step is to delete the plugin to be sure it was not infected and reinstall it.

  8. Excelente plugin, trabaja bien , de lo mejor que he probado. Gracias amigo y buen verano.

    Excelent plugin, works fine, better plugin that I installed. Thanks and good summer my friend.

    Please update for ever, thanks

  9. Successfully installed hypercache! Thanks for such simple, one-click plugin.
    Also I’ve installed another plugin which re-generates hypercache every 24 hours. All pages which are expired from hypercache are re-generated and again kept in hypercache.

    1. Restore the original wp-config.php (remove the line you added) and eventually remove the file “wp-content/advanced-cache.php”. But the problem is surely the modification of the wp-config.php. Do not copy the copy in the page since the single quotes are not valid: write if by hand.

      1. I read somewhere: “If it does not add the code above then you have to add it manually. This code is needed for the plugin to work.”

        Probably I misunderstood you.

        I thought I had to add this line of code manually ANYWAY. But it does n’t seem the case anymore? Only in exceptional cases?

        1. Carefully skipped the line and replaced the config-file, and subsequently removed the advanced-cache file, but the problem is still a blank WordPress-page with HTTP-error 500 (Internal Server Error).
          Uninstall WordPress and install again?

          1. Hi, I need and FTP access to the blog and the blog address to find out the problem. As I asked before, try to send me the wp-config.php: if it’s the only file you changed probably it’s a matter to adjust it.

  10. Help! My server is centos + nginx + php5.3. Is there any problem with this environment? The Cleaning process time of hyper cache is always the time of activate the plugin plus 5 minutes. It never changed unless I reactivate the plugin.

  11. I installed W3TC and had many problems. Now I uninstalled HyperCache to use, but I can not remove the folder from the server cache. How do I do that? My Server is: Linux!

  12. I wrote about my issue of using different style for different broser using php. I got the fix by javascript. Now I can use this plugin :-)

    <!–
    function hello(){
    var browserName=navigator.appName;

    if (browserName=="Microsoft Internet Explorer")
    {
    document.getElementById("demo").innerHTML="It works well when

    h1 is style for IE”;
    }
    else
    {
    document.getElementById(“dynamicstyle”).innerHTML=”It works well when

    h2 is style for non-IE”;
    }
    }

    //–>

    Default Text

  13. sounds very simple and logical for caching. I guess I can do and still have dynamic nature of my post (with delay of 24 hrs) – that is no issue.
    Please answer this:
    I have different fixes for different browser. (few issues with styles so I dynamically change style in php code for browsers such as if(is_IE) use_style_IE else use_style_all). Is there any way this plugin creates browser specific cached files and serve accordingly.
    Please give a fix/answer asap – thanks

  14. Dear can u help as i install, but i think home page cache is active, or site indexing in Google almost after in 24 hours daily as Cached pages timeout was set 1440 .
    So what i do for this that Google index posts as posts write.

    Also i will check option :-
    Home caching
    DO NOT cache the home page so it is always fresh.

    or not checked. for home page not cache.?

    Thanks

  15. Hyper Cache is awesome… Thanks so much for it.

    I also have “Better WordPress Minify” installed, it was installed before HyperCache.

    Should I disable this minify plugin now? Does Hyper Cache take care of this function?

    Ane one more question.
    I also installed “DB Cache Reloaded Fix” with Hyper Cache but the testing I performed returned slower results with the two installed. So I disabled DB Cache.

    I know results will vary.. but any general comments on above?

    Thanks again for Hyper Cache, its blown away everything I’ve tried.

  16. Hello,
    Just installed the plugin. Now i have access only to the home page but all other links from home page return a 404 (from the host, not WP).
    Within WP admin, when I want to preview a page, I also have 404 errors (from webhost, not WP)
    My install is a WP 3.2.1 in French with a specific theme.
    The define is installed in WP-config.
    Strange though, the cache folder is /wp-content/cache/hyper-cache/”cachefile”

    Please help…

    Philippe

  17. hey great plugin, can you consider a clear cache button at the top of the admin bar, so we dont have to dig into the plug to refresh, i think one of the other cache plugins did that.

  18. Actually installing the plugins under load considerably,
    which is good, however there were serious problems on my site.
    1 .- In Google Chrome updated my page appears.
    2 .- Morzilla my home page appears with old posts.
    3 .- The worst, The Posts do not appear in Google is that search engines do not detect my “New Post”
    Please could give me a solution.

    my email is:
    pedro_galvez69@hotmail.com

  19. just wanted to know how to enable homepage caching. The option say “home caching” but the description says “DO NOT cache the home page so it is always fresh.”

    Should i check it or uncheck it? i need homepage caching

  20. Thanks for this awesome plugin . I am a share-webhost user, and was searching for a caching plugin which would suffice my need . After going through various reviews all over the net for wordpress cache plugin, I chose hypercache without anymore hasitation.

    Thanks a lot

  21. I’m sorry to let you know that I decided to remove the best cache plugin until now. The newest version had too many problems and I got more and more complaints. Cached files are always 0 according to the plugin but under plugins the cache dir is completely full and never emptied. Under wp-content the cache folder is always empty or has only one archives.dat file.. I hope that I can see what causes this in my development environment.

    1. In Reply to myself:
      I completely de-installed the plugin, Downloaded version 2.4.3 and installed that one. After this I upgraded it to the newest one. Made the cache dirs in the wp-content 755 and now it seems to work. Also the clear button seems to work now.

  22. Hi there, just wanted you to know that I am a WP developer and have used your plugin on multiple websites and I’m having A LOT of complaints from clients with your latest upgrade. Not sure what happened… a few other comments on your site mentioned the SAME problem, that some browsers are saving old site information and they are not seeing the newest content. This hasn’t happened before, but with your recent upgrade it started to cause problems. We’ve tried removing your plugin and the folders associated with it… but it’s still causing a problem for most of my client’s visitors. Is there a way you can help us? It would be sad for this plugin to receive bad ratings from multiple people after such a long time of good use. Please help. Thanks.

  23. I have tried sooooo many plugins for WordPress. But yours is definitely the best i have seen so far. Very solid product, and so easy to use as well.

    It would be nice if there is an auto caching feature on a regular schedule basis, but still, i have no complaints.

      1. with autocache per cronjob everybody (including first visitor/google) will get the fast load from cache and every page is cached at same time (for example at 3h in the night).

        without autocache the first visitor get the slow pageload.

        if this first visitor is google it will not like it, because they use performance/speedload for ranking now.

        autocache = not a bad idea.

  24. i tested the v2.85 but HC is still not working correctly.

    cached files is most of the time “=0″. no files in cache directory.

    only sometimes i clicked some pages (not logged in) and it counts. but for example it counts 3, but i clicked 6 or more pages. very crazy.

    i deactivate/activate but nothing changes.

    i have a deflate in htaccess, i do not know if this is a problem:

    ### COMPRESS

    SetOutputFilter DEFLATE

    but without deflate it seems to be the same error.

    1. I agree.

      I think that there could be a bug in v 2.8.5:
      probably there is a mistake in $hyper_cache_path

      logs reports an error in:
      /wp-content/plugins/hyper-cache/cache.php on line 249, 250 and 251

      Satollo! Can You help us?

      Many thanks!

      1. Just uninstalled the hypercache plugin after 6 months of satisfaction… I have a problem with the new versions that people with firefox can’t see any updates.. though i am clearing the cache..

        Any solution for this…

        1. I’m having the same problem as Kasper. New pages are not showing up for many users.

          What can I do? I don’t have version 2.8 to roll back to, and I don’t want to go back to wp-supercache!

  25. yesterday i did not find any files in cache directory with v2.83. it seems to cache, because of speed – but no files.

    in hypercache/admin: Files in cache = 0

    today google kicked off almost all pages of our website. i do not know if this is because of an issue in hypercache v2.83. other sites are working well (with v2.80).

    i installed v2.80 now to check if this was the problem, hopefully google will give us another chance ;-(

      1. thats what i did yesterday. now it works with old version v2.80.

        it is very bad to get out of google index. i will NOT install a newer version of hypercache next days. i wait for stable version …

    1. Same here..

      There is a lot of new files in the wp-content/plugins/hyper-cache/cache folder
      but the admin says
      Files in cache = 0

      I think it looks in the new folder
      wp-content/cache/hyper-cache which is empty all the time

        1. My cached files are always 0 or max 1.
          Even when I deactivate and re-activating the plugin it doesn’t help. I always have 1 cached file and called archives.dat under wp-content/cache/hyper-cache

          and a whole load in plugins/hyper-cache/cache

          Clearing the cache doesn’t seem to remove the cached files in the plugin dir. What to do?

  26. hello stefano,

    thanks for the quick work. i updated for v2.83.

    now i found a MUCH(!) better admin/setup of hypercache. great, thanks!

    there is a directory /cache/hypercache below wp-content. i would love that too, but its allways empty! i checked it past 20min, increase the rights to 777 – but its still emtpy.

    in backend/admin i find allways: Files in cache = 0

    something is not working … it seems to be fast (>=second load of a page). but i found no cached files?? something is still wrong…

    i set debug=true and found this erros:

    Notice: Use of undefined constant SID – assumed ‘SID’ in …/site/wp-content/plugins/hyper-cache/cache.php on line 11

    Warning: Invalid argument supplied for foreach() in …/sites/lanzarotelive.de/site/wp-content/plugins/hyper-cache/cache.php on line 275

    i dont know if this is a problem too?

    i guess every italian guy is at the beach end of july … but perhaps i am wrong ;-)

    hope you will fix it… grazie

    ciao norbert

  27. Clear Cache button does not work with 2.8.2! I have to manually delete cache files. I tried to change dir rights to 777, but, alas, no effect…returned to 2.8.0 :(((

  28. The lastest revision is bad. The plugin admin page is now tedious and requires lots of clicks.

    Much worse is that the plugin doesn’t work anymore at all (even after once again manually creating a cache directory). It says it caches 1 page. Never more, never less. Before it cached hundreds of pages on the same site.

    Please roll back to the previous version. It worked and was simple to setup, had a nice admin page.

  29. hello stefano,

    i use hypercache for some years now, was a satisfied user – and made my donation long ago ;-)

    this was and is a great plugin, but there are 2 big problems …

    1. ADMIN

    in the new version the hypercache admin in the wp-backend ist really bad. before it was ok, you could see all options and complete setup with one view.

    now you have to do a lot of clicks and mousemoves to see the same.

    with one project there is no problem, but if you have more projects you cannot see whole setup with one view, you have to click 6 clicks more to check hypercache setup, in each project! why???

    it makes no sense to do this, with >30 projects you dont like that. and there is NO BENEFIT to do it like now!

    please think about: before it was MUCH better !!!

    2. /CACHE

    second problem exists now for some time.

    with each update hypercache kills the “/cache” directory. this is dangerous, because if you forget (or are not able this second, because you are on the road without your main pc) to create it with ftp you have a big problem:

    hypercache will not work!

    better solution: not to kill the whole directory, but only subdirectories and files inside.

    by the way it would be better to place the “/cache” directory directly in “/wp-content/hypercache” or “/wp-content/cache”.

    i love hypercache for its stability and would like to use it in future too …

    ciao
    norbert

    1. Hi Norbert,

      I second your 2) observation. Just upgraded hyper cache yesterday and ‘ops’ my /cache directory was removed and the plugin would no longer work. I was away from home and in a network where I would not be able to run ssh, but luckly I was able to create the directory using the web based file browser interface of my host provider and created the directory by hand.

  30. I’m not sure where to put this in, is there anyone who can be more specific where to place the following code:
    ———-
    To stop Hyper Cache to cache a specific request, simple declare a global variable:

    global $hyper_cache_stop;

    and set it to “true”:

    $hyper_cache_stop = true;
    ———-

    I have the same challenge like “lisa April 30, 2011 at 7:39 am”, so it would be very nice to exclude for an example the plugin/widget “Wunderground” placed in sidebar for caching, because the weather information always a day behind. Thanks in advance.

  31. hello,
    Today i just recieved update of hyper cache i upgraded and it seems after upgrading my server started using more resources and increase in avg cpu load :( .
    i have checked settings they are like in the older version.

  32. I’m using Hyper Cache on one of the sites within a multi-site implementation. I recently updated the header.php and footer.php and cleared the cache.

    However, the changes I made in these files are not visible. I ended up deactivating the plugin, clearing the cache (wp-content/hypercache/cache), deleting the plugin from the plugin directory. The change still hasn’t shown up yet.

    Any ideas? I’m a bit perplexed.

    Thanks.

  33. I use Hyper Cache on my blog (www.notpt.com) and I thought everything was running great, but when I check my error logs in cPanel, I’ve started noticing a lot of the following error:

    PHP Fatal error: Call to undefined function is_home() in /home/……/public_html/wp-content/plugins/hyper-cache/cache.php on line 201

    I’m not sure what code I needed to include here, so if there’s something I else I need to post, please let me know and I will right away.

    If anyone can help me fix this, I would really appreciate it! Have a great day!

  34. Where can I find the changelog for 2.7.7 and 2.7.8 and 2.7.9 and 2.80?

    I’m still using 2.7.6 because I would like to know what is changed before I download the latest version.

    Thanks!

  35. Hi, you say that you don’t make any DB query when page is cached, do you also include that it doesn’t make database request when translating pretty urls to pages?

  36. Hi,

    i’m trying to intall this plugin, but can’t get it to work.
    I’m not using the default content folder “wp-content” but a custom folder.
    how to get this plugin to work?

    thanks

  37. How can I exclude parts of the page (such as JS, ads etx) that I don’t want cached?

    Polls, ads and some ajax functions stopped updating when I installed this plugin.

  38. Where get support for this. I installed, WP says it is active. Cache folder is created w/ _test.dat but nothing else gets cached, page source does not show cache message and when I go to settings I get errors like this on the page:

    Undefined index: plugin_mobile_pack in etc.

  39. Good news! I moved to a new host and Hyper Cache compression works with no problems now. Very fast and reliable!

    I would like to ask you for a favor, though. I also had to change my domain and I would like to remove references to my old domain. The two comments below contain my previous URL. I would much appreciate if you could change it to fotoandfashion.de

    Thanks a lot!
    Andreas

    http://www.satollo.net/hyper-cache-help/comment-page-3#comment-12898
    http://www.satollo.net/plugins/hyper-cache/comment-page-2#comment-12787

  40. Where I can find the setting for auto clean cache?

    I checked the setting page on the wp admin, but cannot find any..

    I have some issues with inodes (on cpanel) because the plugin crete so many cache file, so I want to set the auto clean (delete) cache every 24 hours.

    please help.

      1. Just an update, I had the ob_start(“ob_gzhandler”); lined added on my index.php for compression and it was interfering with the hyper cache plugin compression. I removed the line, enabled compression from hyper cache and it’s working fine now.

  41. Hello,

    Thanks so much for this plugin! It’s really fabulous, but I’ve found that my WPTouch plugin no longer works. When I was using W3 Total Cache, it worked fine. Is there something that I’m doing wrong or something special I need to do in the Hypercache plugin setup? Thanks so much for your help!

  42. You might want to include the instructions about adding the line to wp-config.php at http://wordpress.org/extend/plugins/hyper-cache/installation/ . I had an error after intalling the plugin. Finally just did what it said. Then I found that you included the instructions here.

    Other than that hassle of trying to figure that out, great plugin! I used Google’s Page Speed plugin to measure loading time on my site before and after installing your WP plugin. What a ginormous difference! It was 40/100 before and 80/100 now. I have a few more things to tweak now. Thanks!

  43. I’m trying to use hypercache with Login Configurator (http://wordpress.org/extend/plugins/login-configurator/).

    Login Configurator restrict access to blog posts by limiting non-registered users to only view archive and home pages. If they click on a link to view a post they must login.

    From what I understand, Hypercache does not cache registered users so none of the blog posts should be in the cache as only registered users can view them. This seems to be happening as the cache doesn’t show any pages saved as registered users browse the site.

    However, when un-registered users view the posts, the first time they get a login screen, but the next time they can view them without the login screen and the cache counter has increased. So it seems that the page was cached even though they got the login screen, and the next time it was served from the cache.

    Is there a way to stop pages from being cached if they are not actually served to the user?

    Thanks.

  44. Hi there
    I’ve been using Hyper Cache for about 3 months now and the difference in resources saved has stopped by hosting company from chucking me of their server.

    Thank you very much for this!

    The next thing I’d like to do is to setup CDN. Can Hypercache support this?

    Any advise would e great

    Wolf

  45. I tried all caching plugins. I think the best solution is hyper cache + db cache reloaded.

    Db cache has some problems with wp 3.1, i hope that will be solved soon.

    Finally, thank you my friend for this plugin. And i want to translate this to turkish =)

  46. I’m interested in using your plugin so i search for the best cache plugin and i found your hyper cache from this site:http://bit.ly/hypercache
    Reading the benchmarking results there makes me wanna try hyper cache, but 1 thing for sure i’m not a techy person so i’m kinda blur about the gzip thing, how to use gzip together with this plugin? where to find the best gzip? is it i have to configure it in my host or is it a type of plugin too?

    1. I found the best gzip solution is to use the lighttpd webserver and turn on the compression module, then turn off gzip in hypercache. If they’re both turned on it leads to random blank screens.

  47. I notice that you’re using a Wootheme – so am I. I’m having trouble with the compatibility between WP Super Cache and the Woothemes sliders – does hyper cache have any conflicts with the sliders? If I download HyperCache, can I delete Super Cache?

  48. Hypercache is awesome!!!! It’s much better than wp supercache.

    There seems to be an issue in 2.7.8 where sometimes when you manually clear the cache it stops caching new requests. If I deactivate and reactivate it, then it starts caching again.

  49. i like Hyper cache !

    But if hyper cache have .htaccess , i think this better because : use htaceess, this dont use PHP to load file so make host load faster .

    Why u don’t make hyper cache with htaccess ?

    1. Excellent plugin. Definetely the best caching plugin around. I had tried the more traditional ones (wp-cache/wp-supercache etc) but they’re a mess to setup and mantain.

      If you check the article on tutorial9 (http://www.tutorial9.net/tutorials/web-tutorials/wordpress-caching-whats-the-best-caching-plugin/) you will see that hyper-cache performs better than the other options that do use .htaccess directly instead of php.

      So considering the simplicity of not having to mess with the .htaccess files, and actually even delivering faster loading times, I’d consider it a feature instead of a downside of hyper-cache.

      Please keep things simple! Loved your plugin, making a donation right now.

      1. I admit I’m a little bit surprise that .htaccess is slower than php but may be it’s justify by the number of rules the rewrite engine should check to serve the right content.

        I would like to ask if you want to run a test with lite cache (with my support) which has the .htaccess and the PHP caching method to see what perform better.

        1. That’s what I thought too. Perhaps overreliance on .htaccess might not pay off if the number of posts/pages to cache is too large. Calling php per itself might not be that expensive in computational terms if we’re gonna hit the cache.

          I could test it at my localserver but I’m not sure it would be representative of the conditions they used on tutorial9 (http://www.tutorial9.net/tutorials/web-tutorials/wordpress-caching-whats-the-best-caching-plugin/). Best option would be to try to replicate their study using Apache Benchmark under controlled conditions (test blog with a moderate number of posts/pages, etc).

  50. On installation (via WordPress.org) and activation the admin pages screams about disabling “the HTML optimization” dated Sep 16.

    What is “the HTML optimization” and how dopes one disable it?

  51. Hi Stefano
    thanks for your great plug in.
    Unfortunately I’ve noticed that the plugin caches also the cart page of the wp-commerce so users are not able to checkout correctly.
    I’m running wp 3.0.4 with Hyper 2.7.6.
    Is there any way to disable caching for all the cart pages please ?

    many thanks

  52. Hyper-cache is the best. I have tried wp-supercache, but one upgrade seriously messed with my admin backend. W3 Total Cache is a bloated memory hog which didn’t have much effect on page-load time.

    But hyper-cache has improved my page load speed by about 30%. It doesn’t need any extra bells and whistles – it just does its job, and does it well.

    It is a lean, mean caching machine.

  53. Stefano, awesome plugin. However, I’m seeing the following error in my site’s error log. Any thoughts on what might be causing it and what I can do to repair it?

    PHP Fatal error: Call to undefined function apply_filters() in /home2/iceflatline/public_html/wp-content/plugins/hyper-cache/cache.php on line 182

  54. Just wanted to say thanks for Hyper cache. We’ve tried 4 others and every time hyper cache outperforms them. Simply the best page cache script.

    One question, is “hyper cache extended” the suggested download now? Since it refers to the same developer in description?

  55. great plug in. perhaps the best in his class, but i have a strange problem, i work in IIS + WP3.01 (ans WP3)
    when the plug in is on, makes my files, in FTP & File Transfer to “dissapear”.

    well, the folder its there the site is working fine, but when i try to update a plug in, the message is ussual somethinh like: could not update because there is no such folder.

    if i to open the folder, there is no files inside the folder. after 20 min ( happens to be IIS cicle), the situation is reverce and after 20 reverse again.

    on for 20 off for 20.
    i had no idea what it is, and like i said am on IIS

    any help on that?
    thanks again

  56. please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Good day! Please tell me that dreams do?
    I foolishly not knowing is not added to the cache:
    /wp-content/plugins/wp-postratings/wp-postratings.php and /wp-content/plugins/wp-postratings
    I stopped working on the rating site((
    Please tell me how to get back that would work
    and yet I have also stopped working plugin autobekap who sent me on email backup database
    Thanks for your help!

    1. Hi Sasha, may I suggest people do not quite understand what your problem is. Maybe all you have to do is just rewrite a message. Hope this helps. And hey Stefano – Hyper Cahce is awesome! Thanks!

  57. please help!!!
    Good day! Please tell me that dreams do?
    I foolishly not knowing is not added to the cache:
    /wp-content/plugins/wp-postratings/wp-postratings.php and /wp-content/plugins/wp-postratings
    I stopped working on the rating site((
    Please tell me how to get back that would work
    and yet I have also stopped working plugin autobekap who sent me on email backup database
    Thanks for your help!

  58. Hi Stefano:

    I thank you every day by this plugin since without it, I could not have my site in the air for all this years.

    There is a typing bug in:
    Advanced options >> Disable Last-Modified header

    There is a text “Diasable some HTTP headers…”

    Change “Diasable” by “Disable”

    …I do not have knowledge in programming but I want to help in something, ja, ja.

    Best regards.

  59. Good day! Please tell me that dreams do?
    I foolishly not knowing is not added to the cache:
    /wp-content/plugins/wp-postratings/wp-postratings.php and /wp-content/plugins/wp-postratings
    I stopped working on the rating site((
    Please tell me how to get back that would work
    and yet I have also stopped working plugin autobekap who sent me on email backup database
    Thanks for your help!

  60. Hi.

    I have a strange situation here testing the plugin.

    advanced-cache.php is created.
    /plugins/hyper-cache/cache folder is created and already has cache files inside.

    There’s no warning in settings page, but…

    After loading the page in a clean browser I can’t see the signature in the html file.

    get_num_queries shows me that wordpress is still accessing the DB.

    Another odd thing. In advanced-cache.php is written $hyper_cache_timeout = 86400; when I have 1440 as timeout in my settings.

    Any idea?

    Any idea?

  61. I spent weeks trying all the different caching plugins associated with WordPress to finally settle into Hyper Cache.

    The only thing I was frustrated with on this plugin is that I wanted everything to be cached as soon as I was finished making changes to the site. I found a solution in a program called Integrity. It is a link checker.

    So now I make changes while serving cached files and then as soon as I am finished I clear Hyper cache, then implement Integrity. This is a nice combination because not only does it force Hyper Cache to cache all pages at once, but it does double duty by checking for broken links as well.

    I am now interested in seeing how DB Cache will work with Hyper Cache so off to check into that.

    Kudos to you my friend for this plugin.

    1. Be careful DeMen!

      DB Cache and DBC Reloaded not work in my WP2.9.2&HC2.7.5. After DB Cache detected problems with header “gzip” in HC job. I change it to 2.7.4 and all good.

      Stefano, in pligin.php stroke

      > $options[‘gzip’] = 1;

      is level or simply enable gzip? Sorry, but I not programmer.

      Thank you.

  62. Hi!

    Thanks for plugin, its really easy and clear for me. But I cant understand one thing. Using tools.pingdom.com for site testing, loading report is like:

    1. file_1.css
    2. file_2.js
    3. file_3.jpg

    et cetera. 35 requests, for example.

    But! If I use HyperCache (or other) it must be like:

    1. 123blablabla456.dat

    And one (or two) requests. Not 35.
    Isnt it?

    Thank you!

  63. Me neither could not automatically update to version 2.7.6. After several times I got succeed.

    Unfortunately my happiness was not so long because the plugin stopped working (I suppose on its way to updated to the newer version).

    It stopped showing cached pages on my site!!! So, all pages on my site are always fresh in spite of cached html files are successfully created and are stored in “cahce” directory!

    I have no idea what the damn happened and rolling back to version 2.7.4 did not help! WordPress version is 3.0.1. Before trying to update the plugin everything was working fine.

    I did not change any settings of plugin and even re-saved them before using on the Options page.

  64. I think the problem with the 2.7.6 upgrade is because the wrong files/version have been uploaded at WordPress – I twice manually downloaded the files (marked “2.7.6”) there to check, and once it was actually the 2.7.5 version and now, the last time, 2.7.4 …

    Please upload the right version, this is a great plugin!

    Thanks

  65. Cannot upgrade to 2.7.6. Running WP 3.0.1. After upgrading using the “updates” feature in WP, I get the message “Hyper Cache was not able to create the folder “cache” in its installation dir. Create it by hand and make it writable.”

    I create the cache directory and make it writable.

    The next page I go to in the admin area of WP the hyper cache plugin is back to needing upgraded. I cam caught in a loop.

  66. Hey Stefano,

    What’s new in 2.7.5? I finally got Hyper Cache to work and I absolutely love it so I want to know if it’s worth updating from 2.7.4 since you never know if things are going to work again afterwards.

  67. Yes it is better than super Cache. Super Cache used to be OK but they have tinkered with it until they have ruined it. It actually causes more load than reduces it.

  68. Very strange, it seems that this plugin does not work at all, I’ve tested it both on windows, linux and freebsd with no success, no file are placed into the cache only a zero lenght file named “_test.dat” … On the contrary no problem with WP Super Cache and W3 Total Cache…
    Thanks

    1. Did you try to test it when logged out of the site? Hyper Cache doesn’t cache files when you’re logged in as admin, I think. That’s kinda bold statement to say that plugin doesn’t work when most of the users say it works perfectly… :/ Also, if you prefer to use WP Super Cache or W3 Total Cache, feel free to do that. Your comment is kinda pointless.

  69. Hi,

    Thank you for your great efforts developing this plugin.

    I recently installed it and set Cached pages timeout to default 1440 minutes. Then I realized that the “Cleaning process Next run on:” date and time does not display my local time.

    After looking into options.php file, I think I should change something in line 108. But I don’t want to mess it up, could you please advice the correct changes I should make? My time zone is Pacific Time (GMT – 7:00).

    Thanks a lot!

  70. is it possible to use hyper cache with a CDN? Or are there any plans to add CDN support in future like w3 total cache? This is a great plugin and very easy to use but i would like CDN support.

  71. Hyper Cache Version 2.7.4
    Is there a way to change location of cache files?
    I’ve tried to change var ‘$hyper_cache_path’ to the required disk path without success (windows server 2003)
    I’ always obtain the error:
    “Hyper Cache was not able to create the folder “cache” in its installation dir. Create it by hand and make it writable.”
    Thanks

    1. “Hyper Cache was not able to create the folder “cache” in its installation dir. Create it by hand and make it writable.”

      Here’s the solution:
      Create folder “cache” here /wp-content/plugins/hyper-cache/
      So it will be /wp-content/plugins/hyper-cache/cache

      Change permission “cache” folder to 777.
      Done. Your problem solved.

  72. Hello,thanks for this useful plugins,i got some problems here,in my admin panel,the “Files in cache (valid and expired)” is always 2,i don’t know if this is means the plugins is not work correctly.How can i fix it?Thank you very much!

  73. I have a big problem with my hosting (hostgator) about server load, i try many cache plugin such wp-super-cache it work well with old wordpress not 3.0

    another is w3 total cache, it’s good but hard to config, so i removed.

    Then try hyper cache i will report latter what happen with mind,

    thank you for your work

  74. Thank you for developing this amazing plugin. It is very simple to install and really speeds up my website. Load time went from 9 seconds on a 2mbit connection to 2 seconds!

    However, one major disappointment is that the ads on my site stopped working. I work with the ad plugin called Adrotate

    http://wordpress.org/extend/plugins/adrotate/

    Pages are cached so the ads do not counts, at the end of the day only 200 views are displayed instead of 6.000 views.

    It is not only adrotate, this plugin also does not work with OpenX and other major ad platforms. Basicly any ad platform that does not use iframe. Only Google Adsense seems to work.

    Is there anyway around this? Or a way to fix this?

  75. Just installed Hyper Cache and love it, but it screws up my home page. My blog is setup under a subdirectory from the main site, example: /blog/

    So, I put / into the URI option to resolve the issue with my homepage, but does that basically stop caching on everything, including my blog located at /blog/?

Leave a Reply