WordPress Caching

Essential: Don't Forget WordPress Caching

Not only a good WordPress hosting improves the loading time of your website - without proper caching WordPress websites are agonizingly slow. That's why in this article we'll explain what types of WordPress caching there are, how they work and how you can use caching on your WordPress websites.

Surely you know the problem that people are not the most patient on the Internet nowadays: If a website takes too long to load, they quickly bail out. Fractions of a second may be critical - and this is where caching comes into play. It is by far the most important tool for optimizing loading time. Because caching ensures that WordPress does not have to rebuild every website in the browser, but can fall back on an already built version.

And because WordPress is based on PHP, which makes the CMS relatively slow, this caching is the most important factor for your page load time.

"*" indicates required fields

Consent*
This field is for validation and should not be changed.

How WordPress caching works

In principle, the more dynamic elements your WordPress website contains, the longer the loading time. Dynamic elements include shopping carts, interactive calendars or maps. In short: all elements and functions that need frequent updates or have to be loaded individually. Static elements, on the other hand, are elements that always remain the same - or at least remain the same for certain user groups. These parts of your site can be easily cached.

And that's what a cache basically always does - transferring the mixture of stylesheets, JavaScript, images, etc. into a static HTML document, caches it, and delivers it when the website is called up. So every time the website is called up, one and the same template is delivered. This way, each element does not have to be recalculated every time the website is called. Therefore, the call with cache is much faster than without.

When the website is called up uncached, the web server and database must be addressed, to put it simply. Computing processes take place on both. A cache bypasses these computing processes and thus saves a lot of time.

WordPress Caching Page Cache
A cache "shortens the path" that the site has to travel to the end device. With the page cache, a version of the site is stored on the server. Even faster is the browser cache, where the site is stored directly in the browser.

The system of caching is doubly important with WordPress, because WordPress is based on PHP. Without caching, WordPress websites run really fast only with correspondingly powerful and therefore expensive hardware. So caching is elementary for your WordPress websites.

By the way, the caches themselves are stored either on the hard disk or in the RAM. Some plugins make it possible to switch between both variants. A cache that is stored in RAM is delivered particularly quickly. However, this also reduces the computing power that is available to your website from then on. Therefore, RAM-based caches are more common for sites with extremely high traffic, because there is enough power available anyway.

If the cache is on the hard disk, it will be delivered much slower. This is especially true if your web server uses an HDD hard drive. SSD hard disks are therefore also a sensible investment in terms of WordPress caching, as they are many times faster than their HDD predecessors. Caching on the hard disk of your web server also does not burden its computing power.

WordPress caching is possible in the browser and on the web server

Basically, you have two options to quickly enjoy good WordPress caching. Either you use a caching plugin, or your web host has already set up a cache on the server side.

WordPress Cache Types
Selection of the types of caches for WordPress

Both ways have at their core the creation of a so-called page cache. This means that a website is completely loaded at fixed time intervals and stored as a static HTML version in the cache. When this website is called up, the prefabricated website is now delivered in fractions of a second.

Another way is to use the browser cache. In this case, the data is not cached on your web server, but on the end device. Their web browser stores the site - and has them for repeated calls then faster at hand. You can activate the browser cache via WordPress caching plugins as well as by settings in the .htaccess file. If your web host does the caching for you, it should configure the browser cache accordingly. Most important for the browser cache is the refresh interval. A common value is one month, i.e. 30 days.

WordPress caching plugin - or server-side from web hoster

There are some very popular WordPress caching plugins. For example, W3 Total Cache, WP Super Cache or WP Rocket. They range from extremely complex to extremely simple and include both free and paid offerings.

Handling and support also differ: Paid plugins often offer more configuration options and personal support, while free plugins usually "only" rely on a support forum.

Paid WordPress caching plugins can do much more than just caching: They compress code, optimize it, cache the database, the site, define the browser cache and much more. This in turn leads to the fact that powerful WordPress caching plugins may require a lot of configuration effort until they really run optimally.

Caching dynamic elements

Even if the page cache is the most important tool in WordPress caching and usually offers the highest savings potential in terms of load time, you do not have to limit yourself to it. Because also parts of the site, which a page cache does not cover, can be cached. For example, the database: A database cache temporarily stores frequently requested database content and thus accelerates calls that cannot be cached.

There is also the so-called object cache. This works in a similar way to the database cache: it temporarily stores frequently accessed dynamic elements. By the way, combining database cache and object cache is not recommended.

WordPress caching also has disadvantages

Noticeably reducing the load time of your WordPress website is the main goal of caching. But caches also bring a disadvantage: If the WordPress cache is activated, information is no longer retrieved live. Depending on the cache setting, your page content may be outdated. This affects, for example, subsequently edited blog entries, but also product descriptions. For example, if you insert a new photo instead of an existing image, the old image from the cache may still be displayed on the end devices for days.

You should be aware of this problem, but it is not serious. Because with many caching tools the "expiration date" of the cache can be set individually and caches can also be deleted manually. The same applies to a server-side WordPress cache. So if you make sure to clear your cache after important changes, you can do little wrong here.

You should also always keep in mind that there are certain dynamic elements that simply cannot be cached. This applies, for example, to shopping carts or personalized content or product suggestions. A cache would also make no sense here, because it would cancel out the individualization and personalization of these elements. The same applies to surveys or individualized calendars, for example. By the way, this is also the reason why WordPress websites with such elements need more computing power.

Conclusion: Setting WordPress caching correctly can be complex

In theory, a cache is relatively simple - it stores the site and makes it accessible faster by turning off computational processes and database queries. In practice, however, this concept meets dynamic and personalized page content. So activating and setting up a cache can be very quick for some WordPress sites, but a lot of work for others.

Even the large and powerful WordPress caching plugins are not easily and quickly configurable in such cases. However, they offer very many adjusting screws for an optimization of the loading time. 

Server-side caching, i.e. via the web hoster, is certainly the simplest solution. Because here, one click is usually enough to equip the site with the corresponding caches. However, the range of functions of these caches can vary between web hosts and is also partly not configurable in detail.

You already have experience with various WordPress caching plugins or even have input for our server-side WordPress cache? Then we are looking forward to your feedback!

Did you like the article?

Your rating helps us improve our future content.

Post a comment

Your email address will not be published. Required fields are marked with *.