Indispensable: Without WordPress Cache The Page Speed of Your WP Projects Will Lose

Jan Hornung Last updated on 21.10.2020
5 Min.
WordPress   Cache 101. WordPress  -Projects faster
Last updated on 21.10.2020

Without a decent cache. WordPress sites agonizingly slow. That's why we explain in this article what types of caching are available, how they work and how to apply caching to your WordPress sites can use.

As a shop owner or blogger you know the problem that your users and readers are not the most patient: If one site loads too long, they quickly jump off. This is a matter of fractions of a second - and this is where caching comes into play. It is by far the most important tool for Optimization of the loading time. Because caching ensures that WordPress not everyone site has to rebuild in the browser, but can fall back on an already built version.

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

That's why today I'm going to explain to you

Functionality of Caching for WordPress

In principle: The more dynamic elements your WordPress site the longer the loading time. Dynamic elements are for example shopping baskets, interactive calendars or cards. In short: all elements and functions that need to be updated frequently or loaded individually. Static elements, on the other hand, are elements that remain the same for all users or certain user groups. These parts of yours site can simply be cached.

And that's exactly what a cache basically always does: It transfers the mixture of stylesheets, JavaScript, images, etc. into a static HTML document, stores it temporarily and delivers it when the page is called. So every visitor to your site site gets one and the same template. This means that every element does not have to be recalculated every time the page is called up. Therefore, a cache is much faster than the standard page call.

For an uncached page view, you must, simply put, web server and database are addressed. Calculation processes take place on both. A cache bypasses these calculation processes and thus saves a lot of time.

A WordPress cache not only shortens the distance a request has to travel, but also provides a faster-to-load variant of the site output.
A cache "shortens the distance" that the site user has to travel. With the page cache, a version of the site page is stored on the server. Even faster is the browser cache, where the version is stored site directly in the visitor's browser.

The system of caching is not available with WordPress doubly important. Because WordPress is based on PHP. Run without caching WordPress sites therefore only really fast with correspondingly powerful and therefore expensive hardware. Caching is therefore elementary for your WordPress -projects.

The caches themselves are stored either on the hard disk or in the main memory. Some plugins offer the possibility to switch between both. A cache that is stored in the working memory is delivered particularly quickly. However, this also reduces the computing power that is available to you from site now on. Therefore RAM-based caches are more common for sites extremely high traffic. Because there is enough hardware power available anyway.

If the cache is on the hard disk, it is delivered much slower. This is especially true if your web server uses an HDD hard disk. SSD hard disks are therefore also a sensible investment with regard to the WordPress cache, as they are many times faster than their HDD predecessors. A cache on the hard disk of your web server does not burden its processing power.

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

Basically, you have two options to quickly get the benefit of good WordPress caching. Either you use caching plugin, or your hosting provider has already set up a cache on the server side.

Selection of cache types for WordPress
Selection of the types of caches for WordPress

Both ways have as their core the creation of a so-called page cache. This means that a site page is completely loaded at fixed intervals and stored in the cache as a static HTML version. If a visitor calls up this site version, he will receive the ready-made "page" in fractions of a second.

Another way is to use the browser cache. Here the data is not cached on your server, but on the end device of your visitors. Their web browser saves the site data - and then has it at hand faster for repeated page views. You can activate the browser cache via plugins caching in WordPress, as well as through settings in the .htaccess file. If your hoster does the caching for you, it should configure the browser cache accordingly. Important for the browser cache is the update interval. A common value is for example one month, so 30 days.

Implementation: Per Plugin or host

There are some very popular caching plugins. For example W3 Total Cache, WP Super CacheCachify. The spectrum ranges from extremely complex to extremely simple and includes both free and paid services.

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

Caching with costs plugins can sometimes do much more than just caching: they compress code, optimize it, cache the databasesite , define the browser cache for visitors and much more. This in turn leads to powerful caching plugins may require a lot of configuration work until they really run optimally.

Even dynamic elements can be partially cached

Even though the page cache is the most important tool for WordPress caching and usually offers the highest savings potential in terms of loading time, you don't have to limit yourself to it. Even parts of the site page cache that are not covered can be cached. For example, there is the database: A database cache temporarily stores frequently requested database contents and thus accelerates non-cacheable page calls.

There is also the so-called Object Cache. This works in a similar way to the database cache: It temporarily stores frequently called dynamic elements. By the way, the combination of database cache and object cache is not recommended.

A WordPress -Cache also has disadvantages

The noticeable reduction in the load time of your WordPress site is the most important goal of caching. But the caches also have a disadvantage: If the WordPress cache is activated, information is no longer retrieved live. Depending on your cache settings, your page content may be out of date. This applies, for example, to subsequently edited blog entries, but also to product descriptions. For example, if you insert a new photo instead of an existing one, users may see the old photo from the cache for days.

You should be aware of this problem, but it is not serious. Because many caching tools allow you to set the "expiration date" of the cache individually and also delete caches manually. The same applies to a server-side WordPress cache. So if you take care to empty 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 baskets or personalized content or product suggestions. A cache would not make sense at this point either, because it would cancel out the individualization and personalization of these elements. The same applies, for example, to surveys or personalized calendars. This is also the reason why WordPress sites with such elements require more computing power.

Conclusion: Setting the WordPress -Cache correctly can quickly become very complex

In theory, a cache is relatively simple: it stores them site and makes them more quickly accessible to visitors by switching off computing processes and database queries. In practice, however, this concept meets dynamic and personalized page content. Activating and setting up a cache can be a problem for some WordPress sites so they go very fast, but for others it means a lot of work.

Even the large and powerful caching plugins is not easily and quickly configurable in such cases. However, they offer a lot of adjustment screws for optimizing the loading time. 

Server-side caching, i.e. via the web host, is certainly the simplest solution. One click is usually enough to equip the server site with the appropriate caches. The range of functions of these caches can vary from provider to provider and is also not configurable in detail by the site operator.

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

RAIDBOXER of the first hour and Head of Support. At Bar- and WordCamps he likes to talk about PageSpeed and website performance. The best way to bribe him is with an espresso - or Bavarian pretzel.

Comments on this article

Leave a comment

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