Best Wordpress Plugins: WP-Cache
Recently I had some problems with my hosting service (I will not include names because they have been reliable so far) and as a consequence the website was taking a lot of time to load. In order to solve that problem I decided to install the WP-Cache plugin.
Wordpress already has a very fast structure so that under normal circumstances you will not need this plugin. WP-Cache becomes useful if your hosting server is slow, if your site has been featured on Digg or if you want to save bandwidth.
The plugin stores your pages on a static file and serves the visitor requests from that file instead of loading the dynamic pages from the database, improving the responsiveness of the site.
The only problem I found through the installation was that it was serving blank HTML pages the first time someone tried to visit them. Once the pages were cached, however, they would appear normally.
In order to solve this problem you need to locate the WP-Cache folder on your server and open a file called “wp-cache-phase2.php”. Once you open the file search for the function “wp_cache_ob_end”, and look for the line “ob_end_clean();” inside that function. Finally just change this line with the following “ob_end_flush();”.
Don't want to miss a single tip?
Subscribe to our RSS Feed!
Related Articles
Bookmark
21 Responses to “Best Wordpress Plugins: WP-Cache”
- Eastern IC
- Phentermine no prescription.
- Creative Friday » Blog Archive » Redesign…Finally
- Почти все про блоги » Blog Archive » Wordpress не для блогов: 16 вариантов
- 5个技巧为你的Wordpress提速 | 后80花园












My website has been running rather slow as well, and I have considered using WP-Cache. However what I’m afraid of is the dynamic aspects of my site (specifically AdSense, and a sliding javascript menu) ceasing to function correctly. Has anybody had experience with this? I understand you can exclude certain files from being cached, but what about AdSense inside the content?
I am not sure how the plugin will affect Adsense. It might cause problems with dynamic plugins like Democracy Polls, but that is the only issue I am aware off.
When I first started my blog, this plugin caused me all sorts of headaches because I didn’t understand how it worked. I was working on customizing my template, and going to check the edits on my live pages - but of course, the edits weren’t showing up, because WPCache serves up static pages.
The workaround I found was to either turn the plugin off when I was making edits, or you can go in and manually delete the html pages in the cache file folder on your server. To turn it off, you need to do that from the WPCache page in the WP admin - NOT by deactivating the plugin.
Just a little helpful info I thought might prevent future headaches for others.
Wendy, you are right, the cache can be a pain when you are trying to change your blog design.
Apart from the cache plugin I also had problems with Wordpress 2.0 cache, which is integrated on the engine. To turn this one off you need to open the wp-config.php and remove the following line:
define(’WP_CACHE’, true);
Once you are done with the modifications you put it back.
I would have to say prior to 2.1 my WP install would take often times ages to load, espcially right after writing a post. No matter what I did my host would always tell me it isn’t on their end but rather it was the software. Now that 2.1 has come out, it’s been blazing fast. Thanks for the tip though.
About the blank pages, did you turn up GZip from the Wp-Admin > Options ??
Btw, to disable the cache temporarily, you can just hit Disable Cache in Options > WP-Cache
WP-Cache is not much helpful if your site is dynamic.However if its partial or static it works like a magic.
If you have scripts, google ads running around your post, there is a marginal increase in the speed but its still worth it.
One more thing, if your site gets lot of comments be sure to set the timeout low.Else the comments show up after one hr which is the default timeout for WP-Cache.
Ajay, Gzip was fine, so I am not sure why the blank pages were appearing, but the tweak I mentioned solved it perfectly.
Ashish, good point, the timeout for the cached pages must be regulated to fit the blog.
What would be really interesting is whether that caching would alleviate DB outages, and PHP install glitches. I shall not mention names as well, but I’ve been plagued by those at my host and I am currently moving.
If plug-in caches pages in static HTML, then I wouldn’t have a problem, but it wouldn’t work, because to pull page from cache PHP should be on. Maybe it would help only with DB outages.
And another curiosity — I use WP within K2 framework, which has built-in AJAX features, including live search, commenting, and rolling archives. So I wonder how would cache work with those things.
@theUG:::
I have not seen the code but it must be able to resolve which page is asked when a url is requested.If cached int should redirect towards the static file and that before sending to php or wp system.It should happen before.
About the ajax feature, i am not sure but since scripts are stored as such within the html file so it will be still called.Anyways Ajax is fast enough so there is no need of caching it.
Hi,
I am investigating whether Google Adsense was affected by this plugin. I have seen my earning jumps up and jump down in a split of few minutes. I afraid Google might think that your websites will get fraud clicks because of caching.
Hi everyone,.. yeah im curious about WP-cache and adsense,.. when wpcache reads the page from the DB is also loads the adsense right? well… when another visitor access the same page.. does he gets the same adsense that was cached early or… he get zero adsense-. thanks
For now I will prefer not to use this plugin..I don’t think there is too much load on my server or server is slow
The WP-Cache plugin has been nothing but trouble for me. Even worse, most of the support forum posts I find don’t recommend anything constructive — “just uninstall the plugin”.
The issue is an internal server error, and it has something to do with the .htaccess file. I’ve tried fixing it, but now that I’ve read it doesn’t work with any dynamic content, I’m really wondering why you would recommend it in the first place…
I will just explain one thing: the wpcache plugin caches the php part of web pages transforming it on pure html so the server doesn’t calls the the php functions and the database everytime someone visit your site.
Since google adsense is not php - it’s javascript - it will still behaving the same way.
It will not be affected!
WPcache doesn’t caches javascript!
Ajax should also work fine since the php is called from javascript and the php is outside the page.