Joomla, Drupal and WordPress are the world’s most popular blogging platforms. Right now I’m staring at the WordPress “Add New Post” page, because this blog is built on WordPress. WordPress is great. And incredibly slow.
Here’s One I made Earlier
This post appeared quickly in your browser ? Great. You have been served a page that was built several hours ago. Without the pre-fabricataion, you would have had a 5 or 10 second wait while WordPress created the page from scratch. Who waits 10 seconds for a page to load these days ? Nobody, that’s who. This post compares two WordPress caching plugins and finds that WP-Super-Cache is the best because of its ability to cache compressed pages.
Caching. The pre-preparing of resources in order to serve requests quicker. WordPress does it through the use of plugins, of which there are several in competition. For example:
- WP-Super-Cache – Been around for ages, very popular.
- Quick Cache – A newcomer, quite popular
- W3 Total Cache – A few years old, moderately popular.
This post considers and compares the first two.
Based on the older and well-liked WP-Cache, WP-Super-Cache is very widely used, and with good reason, being very fast, reliable and well supported. Pre-loading, compression and CDN support are among its many features.
The upstart Quick Cache has gained some popularity by being simple and easy to configure. Quick Cache is quick to set up, with only a single option page and a big on/off button. Fast and reliable too. Honestly, you can’t go wrong.
Both plugins are very reliable in operation. Cached files are stored under under wordpress directory/wp-content/cache, and are visibly numerous and fresh. You can see the files in the cache directory and feel their effect in your website’s speed. To help with administration, both plugins also add notes to the end of each page, describing the origins of the file:
Quick Cache adds a message like this:
This Quick Cache file was built for (server/2012/05/20/large-directory-causes-ls-to-hang/) in 2.71233 seconds, on Mar 24th, 2013 at 6:40 pm UTC. This Quick Cache file will automatically expire ( and be re-built automatically ) on Mar 25th, 2013 at 6:40 pm UTC
All very clear and no nonsense. Wp-Super-Cache leaves a message too, but like everything to do with WP-Super-Cache, it’s a bit woolly:
Dynamic page generated in 3.688 seconds Cached page generated by WP-Super-Cache on 2013-03-24 20:25:12 Compression = gzip
What does that mean ? Was the page created from scratch this time around ? It isn’t obvious. However by looking at a wall clock, I see that 20:25 was 2 hours ago, and as I have just downloaded the page, it must be directly from cache. The quickness of loading was also a clue.
Try it: view the source of this page (Firefox right click->view page source), scroll all the way down and you should see lines similar to the above.
Preload and Auto Caching
Users will be served with cached versions of pages if they are available, offering the fastest browsing experience. If the user hits a page for which no cache copy exists, the page will be built from scratch, sent to the user and held in cache for future requests. That’s great, except it does mean that the page appeared slow for that one user.
The effect is more noticeable in small, low traffic sites such as personal blogs. To ensure a fast download for all users at all times, use pre-loading, (or auto caching as Quick Cache calls it). Basically, every page on your site is constructed and cached in advance. Every user receives a fast (cached) copy.
WP-Super-Cache manages pre-loading a bit better than Quick Cache. Quick Cache is not capable of spidering the site automatically – you must give it an XML map or a list of URLs to pre-load. With WPSC, it is all automatic. All you do is turn on pre-loading and, if you want, adjust a few timing parameters.
In the modern Web, pages are often compressed before being sent to your browser, to speed up transmission. A big page might be 40 Kb in size before being compressed and only 4 or 5 kb afterwards.
Both plugins provide compression, but WPSC is better in one significant way. It stores the compressed files in the cache. Quick Cache doesn’t, and instead has to compress pages on the fly every time someone visits the site. If you have Quick Cache installed and you activate the option for compression, Quick Cache will have to compress the same (uncompressed) cached file potentially many times, once for every visitor hitting the page.
WPSC on the other hand just compresses the page once, stores the compressed image in the cache and serves it up to all visitors. Server load is less and pages are served faster. The compressed elements appear as gzipped (.gz) files under wordpress/wp-content/cache.
Quick Cache works well and will speed up any web site. WP-Super-Cache works even better because it can also cache compressed pages.
The configuration page for Quick Cache is clear and well thought out. Its messages are clear and helpful (eg. the page footer above). By contrast WP-Super-Cache has a complicated multi-tabbed setup page. Settings are poorly described and seem to overlap with each other. Error messages are misleading and hard to interpret, especially in the area of pre-loading and garbage collection.
I can recommend either of these plugins. They are both fast and reliable in operation. However, WP-Super-Cache is the clear winner because of its ability to cache compressed pages.
W3 Total Cache was not considered in the test. It is a large, ambitious beast with many features covering the whole gamut of web site optimization. However in my experience it is just too monolithic and complicated. System tuning should be a step-by-step, evolutionary process, but W3’s size and opaque workings make that difficult. Performance was patchy in my own tests and support is not great. That’s not to say it won’t mature into a great plugin.