WordPress Caching, Part 1: The Basics

Categories

Web Design, WordPress

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.

WordPress Caching, part 1

WordPress Caching, part 1

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.

Let me know what you think on Mastodon, or BlueSky (or Twitter X if you must).

WordPress News

The latest WordPress updates from the WPBriefs Podcast.

Related Posts

16 Sep 2016

What is the Difference Between WordPress.org and WordPress.com?

Recently, I’ve received a couple of emails asking about the difference between WordPress.com and WordPress.org versions of WordPress. The reason for the confusion is that I sell themes for both sites – and I often get people buying my themes...
28 May 2010

WordPress caching, Part 2

As I mentioned in WordPress caching part 1, WordPress has built-in caching that can be hooked into by plugins such as W3 Total Cache and Batcache (developed by Andy Skelton who is employed by Automattic).In this article I am going...
27 May 2013

WordPress: 10 Years Young, What Does The Future Hold?

WordPress is now 10 years old. I started using wordpress 9 years ago – which means I joined the WordPress community early on. The reason I chose WordPress is simply because of the fabled 5 minute install process – I...
25 Nov 2010

WordPress Advent – Seasonal WordPress Savings

In January or February this year I had the idea of making some sort of advent calendar website for christmas. I wanted to share something with the online community – I just wasn’t sure what.In mid October I started thinking...
13 Jul 2016

Why My WordPress Themes Site Doesn’t Use WordPress

I’ve mentioned it before but I run a WordPress themes site called Pro Theme Design. On it, I sell premium WordPress themes – but I don’t use WordPress to power the site.This probably seems like a strange thing to do...