Caching (on the internet) is the act of storing computationally expensive calculations in a way that can be recovered very quickly with the smallest possible impact on the server.
Or, in short, ‘speeding stuff up’.
In this series of posts I will be showing you how you can speed up your WordPress blog. I’ll start with the basics and then move on to how I cache external data in my WordPress theme – Elemental.
Caching Plugins
By far the most popular caching plugin is WP_Super_Cache, but there is a new plugin which I have tested recently called W3 Total Cache.
WP_Super_Cache is a plugin that stores copies of your generated pages as flat html files. This then means that, unless something changes (new post/ comment), subsequent visits do not need to touch the database saving a lot of processing and generally speeding up your website.
W3 Total Cache does everything that WP_Super_Cache does and more. It also helps you manage your CDN (Content Delivery Network), cache database queries, and minify JavaScript and CSS. This plugin was developed by Frederick Townes, the CTO at Mashable, which is a high traffic site so it’s definitely worth taking a look if you’re interested in getting the best speed… however it’s a lot more technical than WP_Super_Cache so requires more configuration. The benefit of W3 Total Cache is that it caches as much, or as little, as you like. Additionally it can cache as flat text files (like WP_Super_Cache) or using memory caching solutions like Memcached.
WordPress built in caching
Something many WordPress developers don’t realise is that WordPress has caching functionality built-in.
Ever since WordPress version 2.0 there has been a caching class used to store previously calculated data. However these are best used when combined with server software such as Memcached or APC to speed up the site massively. Unfortunately many users, especially those on shared hosts, can’t use these services which is one of the reasons plugins like WP_Super_Cache have become so popular.
Any caching you can add to your website will improve performance, and this series will focus on the types of caching that can be applied to plugins and themes, that will benefit everyone. Caching that will speed up any blog – including those on shared hosts that do not have access to MySQL/ PHP settings, or the ability to install software such as Memcached and APC.
In WordPress Caching, part 2, I am going to show you how you can make use of the built-in caching to speed up your themes and plugins, even if you don’t have the server-side software (such as Memcached) installed.
Was it good/ useful/ a load of old rubbish? Let me know on Mastodon, or BlueSky (or Twitter X if you must).
Link to this page
Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.