What is caching and how can it speed up your WordPress website to drive conversions

by Lars Miller | Dec 10, 2019

Faster websites mean more conversions. As previously written, a high-value way to speed up your WordPress site is with image compression. It’s simple to implement and can significantly speed up a website.

Another one of the highest value improvements you can make to your WordPress site is to enable caching on your site. There are two broad categories of caching, client-side caching and server-side caching.

Client-Side Caching

When you load any webpage, you’re typically downloading a main HTML file, which downloads other resources files (CSS/Javascript/Images) for the browser (Chrome/Safari/Firefox) to render for you to view. That may be anywhere from 1 file up to 30 files just to load a single webpage. If your browser is continually downloading the same file without any change to that file, it’s a waste.

Client-Side Example

Typically a website has the same company logo on every page of a website. If you visit a website for the first time, your browser downloads that logo to show to you in the browser. The next time you refresh that page or visit another page on the website, the browser is prompted with the same instruction to download that logo, but it has already been downloaded with instructions to keep showing the downloaded version.

Server-Side Caching

While your browser is looking at HTML, every time you load a WordPress page is a request to compile HTML using PHP and MySQL. Depending on the query (what the browser is asking for), some pages can take some time to render. The more complex the query, the more ‘expensive’ of an operation it is for the server. Server-Side Caching remembers the output of frequently-made queries and stores those outputs in an efficient manner.

Client-Side Example

We often use Custom Post Types when building WordPress sites. A typical example of this would be a ‘Bio’ Post Type to store information about staff to be used within a block or template.

In the template, we could conceivably write a query asking to look for all Bios that have a particular meta data and return that list as an unordered list. What we asked for was a database query, and then a ‘for-loop’ returning the HTML as unordered list items (<ul><li>Item</li></ul>). After we’ve run this once on the template, why would we bother with looking through the database or running a ‘for-loop’ with PHP? Just give me the same HTML as last time.

It’s faster and it saves your server the ‘expense’ of duplicative queries.

Get some cache!

You can see if you are using any caching plugins already on your WordPress site by logging in as an administrator and clicking on Plugins. That’s a great place to start.

If you are looking for recommendations on which caching plugin(s) might be right for your site, I would recommend talking to your website host. They typically test different WordPress plugins to know which work best in their hosting environment and/or CDN.

About the author

 by Lars Miller

Posts by this author