Features and download

Download 1 Blog Cacher 2.0 (zip, 12 KB)

1 Blog Cacher is a Wordpress plugin that caches your pages in order to increase the response speed and minimize the server load.

Features

  • Wordpress 1.5+ compatible (tested in 1.5, 2.0, 2.1, 2.2, 2.3, 2.5 and 2.6).
  • Quick and easy installation/configuration.
  • Portable: edit the file for your convenience and use it anywhere.
  • Cached files are stored in HTML files, and organized in directories emulating the urls, so it's easy displaying the content of the files and organize them (for instance deleting the cache for a given entry, for all categories, for all searches, for all posts from a given date, etc.)
  • If «safe_mode» is enabled, the plugin will still work, creating all the files in the cache directory.
  • Option to remove all cache files (or just the expired ones) from the WordPress panel.
  • Expiration time for cached files.
  • Rejected and accepted strings in order to control exactly the urls to cache.
  • Rejected User Agents in order to avoid over-caching from search engines.
  • Cached files (including front page cache) are updated when posts and comments are published/edited/deleted.
  • Option to include an «Expires» header in order to enable browser cache (even fastest response speed and less page requests.
  • Only GET requests are cached.
  • Browser super-reload (Ctrl+F5) avoids cached urls.
  • Compatible with Gzip compression.

Based on

Thanks to both!.

Installation

  • (Optional) Edit the values in the advanced-cache.php file (define...) for your convenience (further information in that file).
  • Create the cache directory /wp-cache/ in your WordPress directory (/wp-cache/) and make it writeable (chmod 777).
  • Upload 1blogcacher2.0.php file to /wp-content/plugins/ WordPress directory (/wp-content/plugins/1blogcacher2.0.php).
  • Upload advanced-cache.php file to /wp-content/ (/wp-content/advanced-cache.php).
  • Add this line to the wp-config.php file («/wp-config.php»): define('WP_CACHE', true);
  • Activate the plugin and take a look to «Options > 1 Blog Cacher» in the WordPress panel.

That's it! Optionally you could password-protect the cache directory or limit the access in any way (for instance via .htaccess file), though it's not that people will be seeing anything that couldn't see browsing the site normally.

Very important

  • If WEC_ENABLE_BROWSER_CACHE is true, you will be seeing a browser-cached page, so the plugin won't be even running. Hit Reload (F5) to see the plugin-cached version of the page.

47 comments

#1. Jean-Paul Horn, 10 months and 25 days ago

Wow. I guess I'm the first one to comment on your new plugin. Let me first state that I completely wiped WP-Cache in favor of your plugin. I love some of the extra features and to be honest; developement of WP-Cache was dead a long time ago and I rather support a developer who's willing to pick things up again.

Everything is running smoothly with 1BlogCacher, but I just can't seem to get the new (2.0) dynamic code to work. This used to work perfectly with WP-Cache, but with 1 Blog Cacher I just get a completely white page (no source code either). I used this function call(s):

[!--mclude /wp-content/plugins/rthanks.php--]
<!-- -->
[!--/mclude--]
[!--mfunc refer_thanks() --]
<!-- -->
[!--/mfunc--]

This is the plugin's url: rThanks.

Why do I get white pages (no output) when I include this in single.php? Did I misunderstood the compatability?

Oh! I have all the default options in advanced_cache.php, including:

define(«OBC_LOOK_FOR_DYNAMIC_CODE»,true);

Thanks for looking into this!

#2. Javier García, 10 months and 25 days ago

Hello,

There were two problems:

- First, the function was being called before the include, I fixed this on the plugin.

- Second, the rthanks.php returns an error. Besides it's missing the ending PHP tag (?>), it calls the get_option function, which is not defined when the cacher is called in advanced-cache.php. The whole point of all this is saving all the operations from WordPress, so WP doesn't load fully. As far as I know this also happens in WP-Cache.

Regards

#3. Jean-Paul Horn, 10 months and 25 days ago

Hi Javier,

1. Did you mean I should redownload 1Blog Cacher? (meaning: you fixed this in v2.0)
2. Will check on the missing end tag, but it didn't work with another plugin either.

Performance is excellent btw!

#4. Javier García, 10 months and 25 days ago

1. Yes
2. it could be that a function was called after the include where it was defined (error fixed) or that the plugin also returns an error (same problem). If you check an include with code that doesn't return an error you'll see it works.

#5. Jean-Paul Horn, 10 months and 24 days ago

Thanks Javier. The rthanks() plugin now works again :)
I seem to have trouble with another plugin (Who Sees Ads), but I already had this problem with WP-Cache. It has to do something with parameter calls. Dynamic functions somehow only seem to function when there's nothing between the parenthesis ().

Works:
[-?-php rthanks() -?-]
Doesn't work:
[-?-php wp_ozh_wsa('mybanner') -?-]

#6. Sarsura, 10 months and 14 days ago

Hi,

sounds like an interesting plugin and wp-cache2 replacement.. does someone made some performance compares against wp-cache2? It seems, that this plugin is more often updated and the better solution for me.

thanks for this plugin, great work in my opinion.

#7. Sarsura, 10 months and 13 days ago

hello again,

since i installed blog cacher the semmelstatz plugin isn`t logging refferers.. hits work and visits (i think) but referers not.

#8. Javier García, 10 months and 13 days ago

When a cached page is returned the plugins are simply not being called, that's the whole idea, not having to load all WordPress to return the page. You should use dynamic code in order to get this kind of things working.

#9. Sarsura, 10 months and 13 days ago

Hi Javier,

if i use the dynamic functions (mfunc e.g. like ) the browser loads an blank, white page. i tried both, php include and func, both gave me a white page.. hm, i don`t care about a lot and 1 blog cacher is sure the better choice than wp-cache since version 2.0, and there are apache logs, sure, to get a statistic overview; but i like semmelstatz plugin, maybe i find a way to get my refferes back (hits are working). thanks for you fast reply

have a nice day

sara

#10. Javier García, 10 months and 13 days ago

> if i use the dynamic functions (mfunc e.g. like ) the browser loads an blank, white page

That happens when the code (or the included file) returns an error. If you are calling the plugin, surely it is using functions that are not available when 1 Blog Cacher is running (before WordPress is fully loaded).

#11. Eric, 10 months and 3 days ago

Hi, i'm using right now wp-cache and it's a great plugin.

But, I want to know what is the difference between this plugin (i blog cacher) and wp-cache.
It's a good idea to switch to «1 blog cacher» from wp-cache ?

thanks for your answer.

#12. Javier García, 10 months and 3 days ago

Hi, I'd say more customizable, more features (for instance gzip support), better performance (thanks to a different approach in caching and better header responses)...

#13. Eric W., 9 months and 26 days ago

Hi there,
I've got the following error:
----------------------------------------------------------------------------
Installation error

The file - /www/htdocs/v101/wp-content/advanced-cache.php - is incorrect or you haven't added the code define('WP_CACHE', true); to the file /www/htdocs/v101/wp-config.php

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

I've uploaded the file in the correct folder (wp-content) and I added the line to the wp-config.php.

Any idea how to get the plugin working? I've got WP 2.3.1

#14. Javier García, 9 months and 26 days ago

Hi, check that you have added the define line where the others defines are, before the include.

#15. Lazy, 9 months and 24 days ago

..and now tested in 2.3 and 2.4 trunk and seems to work :)

#16. Arkenor, 9 months and 16 days ago

I was wondering. Is the user experience when they view the site identical (apart from being faster), or do things work differently?

#17. Eric W., 9 months and 13 days ago

@Javier García,
you are my hero! I've now added this line directly under the mySQL-Settings, now it works perfect. Thank you.

#18. Alex, 9 months and 1 day ago

Hi,

a little bug report along with a fix: The plugin doesn't work on sites with SSL support. When the plugin is installed and run at https://www.example.com/, it tries to redirect to https://www.example.com/. In some cases, this will undermine security, when the non-secured site is displayed instead of the secured one. in other cases, when the http site redirects to the https version, the plugin can cause an infinite loop.

The fix is quite easy:
In advanced-cache.php, add a line define("OBC_SCHEME", 'https'); to the settings. Then replace the hardcoded references to "http://whatever" with OBC_SCHEME.''://whatever". Works fine in a project of mine.

#19. Alex, 9 months and 1 day ago

Of course, the default value for OBC_SCHEME should be 'http'.

By the way, another option would be to determine the scheme automatically, for example as in wp-login.php.

#20. Javier García, 9 months ago

Hello Alex,

I'll definitely fix that for the next version.

#21. Alex, 8 months and 29 days ago

Hi, me once more. As I have a working copy of the site on a non-SSLed server, I had to find a dynamic definition of OBC_SCHEME. Here it is (inspired by wp-login.php):

define("OBC_SCHEME", (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http'));

#22. Alex, 8 months and 25 days ago

Sorry to nag again, but there is yet another issue with your plugin: You've choosen the CC-BY-NC-SA license, which conflicts with the GPL license of WordPress, as it allows no commercial usage (commercial usage is not bad, as long as people share the modified code!). This makes many usage screnarios of your plugin very problematic; in fact, no company website would be allowed to use your plugin. Your CC license is also problematic as your plugin is based on WP Cache, which is released under the GPL, and you cannot put the code under a more restrictive license.

Therefore I'm asking you kindly to consider releasing the next version of your plugin under the GNU GPL.

#23. Javier García, 8 months and 25 days ago

Hello Alex,

Not commercial means that you can't sell the plugin. Of course you can use it in company websites, pages including ads, etc. WordPress has a GPL license, but this isn't a WordPress distribution, but a plugin (think of it as an image, a document...). The plugin is «based» on WP-Cache in terms of functionality (and of course it's not exclusive of WP-Cache), but there isn't a single line of code from that plugin.

#24. DLE, 8 months and 16 days ago

Much smoother cache plugin than WP-Cache! Thank you.

However, I am having a major problem: my comments will not refresh. In other words, new comments don't show up in the page after being submitted. They show as being received in the Comments portion of the Dashboard, but otherwise they don't show on the cached page being retrieved.

I use Brian's Threaded Comments and Spam Karma 2. In the past, those did not play nicely with WP-Cache. However, Spam Karma 2 includes a plugin that forces it to work with WP-Cache correctly. Enabled or disabling it, though, did not fix the issue here. Brian's Threaded Comments also had a workaround with WP-Cache.

Any ideas? Your plugin works great, but if I can't get my comments to show, I'll have to disable it. :-(

#25. vihali, 8 months and 11 days ago

Hi,

My blog is low commented since it's truly personal and very few friends of mine come to check it. Do you think that it is reasonable to use caching?

I'm using a plugin to display a picture on Picasa randomly. If I installed caching plugin would it work as normal?

#26. vihali, 8 months and 11 days ago

One more question concerning the compression. As I understand, the server will zip the files and send them upon the request. User end will unzip it and show the result on the browse. These steps surely consume some time (and server load as well). I have no idea about this time scale, is there any case that this time is greater than one we save due to the small files?

#27. Javier García, 8 months and 11 days ago

> My blog is low commented

It's not a matter of comments but visits. Anyway if just some people visit the site and you are not having problems, probably you wouldn't even notice the plugin.

> I'm using a plugin to display a picture on Picasa randomly. If I installed caching plugin would it work as normal?

You can use dynamic code (read features).

> These steps surely consume some time

With gzip compression there is more CPU consumption, but every connection is stopped before (less to download), so memory is cleared faster. It's hard to say what is more convenient, and it probably depends on each case (though most sites I tested lowered their server load after enabling zip compression). In any case zip compression is a WordPress feature, you could ask in a more general site/forum.

#28. Torrence Davis, 8 months and 7 days ago

I get this error after install:

1 Blog Cacher
Installation error

The file - c:/Websites/digitalpickles115/thebitbag.com/wp-content/advanced-cache.php - is incorrect or you haven't added the code define('WP_CACHE', true); to the file c:/Websites/digitalpickles115/thebitbag.com/wp-config.php

I added the define line and still get the error. At first I thought it had to do with 2.3.2 so I put it on a 2.3.1 install then upgraded the install and the plugin still worked on that install which is another site. I've tried everything and can't get it to work. I've disabled ALL plugins and still can't get it to work. PLEASE HELP ME as I NEED to have caching for when my site gets dugg again.

Thank you so much!

#29. Walter, 7 months and 25 days ago

Great idea, but I'm having the same problem as when I tried WP-Cache. That is, using mclude and mfunc to NOT cache areas of code I want to keep dynamic. In my case, I have a randomized blogroll and real-time visitor stats (using wp_meta()). I can't seem to get those areas to stay dynamic.

#30. Javier García, 7 months and 25 days ago

Dynamic code must be valid code when the plugin runs, this is, before WordPress runs. For instance, wp_meta is a function defined AFTER the plugin runs. I think you don't fully understand the way the cacher works. The whole pint of it is WordPress not having to load fully...

Make your code valid (this is, that it could work as a single file, without calls to external variables or functions) and you'll have no problem.

#31. Jay Thompson, 7 months and 4 days ago

Well that was painless to install! Thanks!

Curious - wp-cache and super-cache don't play well with Bad Behavior. Does Blog Cacher?

#32. Javier García, 7 months and 4 days ago

Sorry, I dont know how that plugin exactly works (I never used it), so I couldn't tell.

#33. Jay Thompson, 7 months and 4 days ago

Well Bad Behavior is still blocking access attempts (as it should) so they seem to work just fine together.

Loving Blog Catcher! Nice work!!

#34. Mark @ TheLocoMono, 6 months and 12 days ago

Have you used this plugin with Alex King's Popularity Contest plugin?

#35. Shanx, 5 months and 24 days ago

Hi. I am using Wp Super Cache, which seems to have some of the same features as your plugin. Can you suggest what is the difference between the two?

#36. Javier García, 5 months and 23 days ago

I haven't had the chance to take a look onto the code of the Wp Super Cache plugin, so I couldn't really tell. But I'd say 1 Blog Cacher has better http headers support (this is better performance, as it saves processing and bandwidth).

#37. Brian Ritchey, 5 months and 18 days ago

I use Search Unleashed to highlight search terms. On it's website, (http://urbangiraffe.com/plugins/search-unleashed/), the author remarks about a change to the wp-cache-config.php file that has to be updated to avoid caching search terms. Would a similar change be necessary with 1 blog cacher? If so, to what file should I add the code?

#38. Javier García, 5 months and 18 days ago

You'll probably want to avoid caching the search files, read the documentation on that plugin.

#39. Brian Ritchey, 5 months and 17 days ago

It has documentation related to wp-cache. It gives the additional code to add to wp-cache-config.php. What is the equivalent file for 1 blog cacher, so I can try that code in that file?

#40. Javier García, 5 months and 17 days ago

There is no equivalent file as this plugin works differently, but as long as it only contains one plugin file (1blogcacher2.0.php), you should try on that in order to avoid highlighted words caching.

#41. Brad Kovach, 4 months and 29 days ago

I found your site because I was checking out the source code on a blog. I just thought that you might like to know that that blog is Ebay's corporate blog: ebayinkblog.com

Congratulations!
And I think I'm going to love this plugin. It seems to support more plugins than WP-C or WP-S-C.

#42. Javier García, 4 months and 28 days ago

Thank you! Glad to know that :P.

#43. ilia, 4 months and 11 days ago

seems like a great plugin, thanks so much. an obvious thing that is missing is an option to temporarily disable cache, like it's possible from within the classic wp-cache. i hope this functionality will be added in the future releases. in general, the web interface looks limited at this time. can't wait to see this one advancing. thanks.

#44. Javier García, 4 months and 11 days ago

Just disable the plugin, it's one click; that option is completely unnecessary. I don't know what you mean by limited but the plugin is the more customizable caching plugin out there.

#45. ilia, 4 months and 7 days ago

Javier, where could i read about about 'dynamic code' support and syntax? what i really need to achieve is being able to use this plugin with an internal stats package like statpress. i know there're external solutions, but i need statpress or its analog to work. obviously statpress is not executed when a cached page is served.

if only i could make it work somehow, that'd make my life compelte :).

thanks again for this plugin, i'm loving it more and more the more i observe its behavior.

#46. Javier García, 4 months and 7 days ago

It's compatible with Staticze Reloaded. From their FAQ:

There are two ways to do this, you can have functions that say dynamic or include entire other files. To have a dynamic function in the cached PHP page use this syntax around the function:


< ?php function_name('parameter', 'another_parameter') ?>
`

The HTML comments around the mirrored PHP allow it to be executed in the static page. To include another file try this:


< ?php include_once(ABSPATH . 'file.php'); ?>
`

That will include file.php under the ABSPATH directory, which is the same as where your wp-config.php file is located.

#47. moises, 17 days ago

O melhor plugin cache do mundo.
very good plugin world

Write a comment

If you want to add your comment on this post, simply fill out the next form:





* Required fields

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>.

20 trackbacks

To notify a mention on this post in your blog, enable automated notification (Options > Discussion in WordPress) or specify this trackback url: http://​1blogcacher.com/​features-and-download/​trackback