{"id":20412,"date":"2026-11-02T12:27:10","date_gmt":"2026-11-02T11:27:10","guid":{"rendered":"https:\/\/stage.surver.nl\/kennisbank\/wordpress-caching-uitleg\/"},"modified":"2026-11-03T12:13:53","modified_gmt":"2026-11-03T11:13:53","slug":"wordpress-caching-explained","status":"publish","type":"kennisbank","link":"https:\/\/stage.surver.nl\/en\/kennisbank\/wordpress-caching-uitleg\/","title":{"rendered":"Caching in WordPress: Types and Configuration"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"642\" src=\"https:\/\/stage.surver.nl\/wp-content\/uploads\/2026\/11\/kennisbank-wordpress-caching-uitleg-v2.jpg\" alt=\"Caching in WordPress: Types and Configuration\" class=\"wp-image-20475\" srcset=\"https:\/\/stage.surver.nl\/wp-content\/uploads\/2026\/11\/kennisbank-wordpress-caching-uitleg-v2.jpg 1024w, https:\/\/stage.surver.nl\/wp-content\/uploads\/2026\/11\/kennisbank-wordpress-caching-uitleg-v2-300x188.jpg 300w, https:\/\/stage.surver.nl\/wp-content\/uploads\/2026\/11\/kennisbank-wordpress-caching-uitleg-v2-768x482.jpg 768w, https:\/\/stage.surver.nl\/wp-content\/uploads\/2026\/11\/kennisbank-wordpress-caching-uitleg-v2-18x12.jpg 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Every speed optimization guide says, \u201cInstall a caching plugin,\u201d but which one, and what does it actually do? WordPress has four caching layers: browser caching, page caching, object caching for database queries, and server caching, such as LiteSpeed. Page caching delivers the biggest performance gains, while object caching is particularly useful for online stores and logged-in users. Below, you\u2019ll learn which layers you need and how to set up caching without breaking your online store. Caching is one of the steps in <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/guide-to-speeding-up-wordpress\/\">How to Speed Up WordPress: The Complete Guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"wat-is-caching\">What is caching?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Caching is the process of storing a pre-generated result so that it doesn't have to be recalculated every time a visitor accesses the page. Without caching, WordPress builds each page from scratch for every visitor. The server runs the PHP code, retrieves the content from the MySQL database, assembles everything, and only then sends back the HTML. With caching, that work is done only once, and subsequent visitors receive a cached HTML copy. This reduces the computational load, so the server can handle higher traffic for longer, and the TTFB\u2014the time to the first server response\u2014is reduced.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I always explain it using the example of a baker. He prepares his best-selling loaves first thing in the morning, instead of baking each loaf only when a customer walks in. He does, however, bake a custom-ordered cake fresh, and in WordPress, those are the shopping cart and the checkout. I\u2019ll come back to that later. The downside of pre-baked bread is that it doesn\u2019t refresh automatically. If you make a change and still see the old version, you\u2019ll need to clear the cache. You can read about how that works at <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/cache-empty-wordpress\/\">Clearing the Cache in WordPress<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"de-vier-cachinglagen-op-een-rij\">The Four Caching Layers at a Glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each of the four layers stores something different in a different location, and they complement each other rather than replace one another.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Low<\/th><th>What Is Stored<\/th><th>Where<\/th><th>Who sets it up?<\/th><\/tr><\/thead><tbody><tr><td>Browser Caching<\/td><td>Images, CSS, JavaScript<\/td><td>Visitor's browser<\/td><td>Caching plugin or server<\/td><\/tr><tr><td>Page Caching<\/td><td>Complete HTML pages<\/td><td>Server<\/td><td>Caching Plugin<\/td><\/tr><tr><td>Object caching<\/td><td>Results of database queries<\/td><td>Working Memory (Redis, Memcached)<\/td><td>Hosting Plus Plugin<\/td><\/tr><tr><td>Server Caching<\/td><td>Pages, even before WordPress starts<\/td><td>Web Server (LiteSpeed)<\/td><td>Hosting<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Browser caching stores static files in your visitor's browser, with an expiration time. The server specifies this in headers such as Cache-Control with max-age, Expires, and ETag. If a visitor returns and a file hasn\u2019t changed, the server responds with a 304 status code instead of resending everything. You\u2019ll notice this especially with returning visitors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Page caching stores entire HTML pages so the server doesn\u2019t have to rebuild them for every visitor. This provides the greatest benefit for visitors who aren\u2019t logged in\u2014which, on most sites, is virtually everyone. My advice, therefore, is to start here. In addition, there\u2019s OPcache, which caches compiled PHP code, and CDN caching on servers located around the world. Your hosting provider handles the former; at Surver, OPcache is enabled by default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"object-caching-en-servercaching-wanneer-heb-je-ze-nodig\">Object caching and server caching: When do you need them?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Object caching stores the results of database queries in memory\u2014usually via Redis or Memcached\u2014and helps precisely where page caching falls short. A WooCommerce store, a membership site, or your own dashboard is difficult to cache as an HTML copy because the content varies by visitor. In such cases, it makes a big difference if the database doesn\u2019t have to answer the same query over and over again. In Site Diagnosis, WordPress sometimes recommends a persistent object cache. This requires Redis or Memcached on the server, and with Surver, Redis is only available on <a href=\"https:\/\/stage.surver.nl\/en\/managed-hosting\/cloud\/\">Surver Cloud<\/a>. On shared hosting, you can safely leave that message as is as long as your page caching is set up correctly. You can find more information in <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/object-caching-redis-wordpress\/\">Object Caching and Redis Explained<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Server caching is caching performed by the web server itself, such as LiteSpeed or Varnish. This is faster than caching via a PHP plugin, because WordPress doesn't even have to start up. However, it does require that your hosting provider runs the right web server. On a LiteSpeed server, the plugin works <a href=\"https:\/\/stage.surver.nl\/en\/news\/boost-your-wordpress-site-with-litespeed-cache\/\">LiteSpeed Cache<\/a> directly in conjunction with the server cache, which you don't get with other plugins. More on that in <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/what-does-fast-wordpress-hosting-consist-of\/\">What Makes Up Fast WordPress Hosting<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what do you need? For a business website or blog, page caching and browser caching are enough, along with server caching if your host offers it. A high-traffic content site with a lot of international traffic would also benefit from a <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/cdn-wordpress\/\">CDN for WordPress<\/a>. Object caching only becomes useful for an online store or membership site with a large number of logged-in users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"caching-instellen-en-controleren\">Setting Up and Checking Caching<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You set up caching using a single caching plugin that's compatible with your web server, and then you check to see if it actually works. That's how I do it myself.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Check which web server your hosting provider uses.<\/li>\n\n<li>Choose the plugin that's right for you. On a LiteSpeed server, that's LiteSpeed Cache; elsewhere, it could be WP Super Cache, W3 Total Cache, or WP Rocket.<\/li>\n\n<li>Use only one caching plugin, and don't use a plugin alongside your host's cache if it performs the same function.<\/li>\n\n<li>Enable page caching and browser caching.<\/li>\n\n<li>Set an expiration time and have the cache preload (in LiteSpeed Cache, this is called the crawler), so that the first visitor doesn't have to wait for an empty cache.<\/li>\n\n<li>Check the default exclusions and test while logged out in a private window.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">That third step is more important than it seems. Two caches handling the same layer won\u2019t make your site faster\u2014they\u2019ll make it unpredictable, resulting in outdated pages and broken layouts. You can check if it\u2019s working in your browser\u2019s developer tools. Open the Network tab, reload the page twice while logged out, and check the response headers. On a LiteSpeed server, the second request will show <code>x-litespeed-cache: hit<\/code>, other plugins send a similar header. If you don't want to set up and maintain caching yourself, then it's part of <a href=\"https:\/\/stage.surver.nl\/en\/services\/wordpress-maintenance-management\/\">WordPress Management<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"pagina-s-die-je-nooit-moet-cachen\">Pages You Should Never Cache<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pages with personal or constantly changing content should never be included in the page cache, because otherwise one visitor might see the data intended for another. Here they are.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The shopping cart, checkout, and My Account.<\/li>\n\n<li>Pages for logged-in users. WordPress identifies them using a cookie, so the caching plugin excludes them from the page cache.<\/li>\n\n<li>Pages with forms or content that varies by visitor.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If this goes wrong, a customer might suddenly see someone else\u2019s shopping cart, or your contact form might stop working. Most caching plugins automatically exclude WooCommerce\u2019s core pages, but I always double-check just to be sure. An online store works best on hosting that\u2019s designed for that purpose, such as <a href=\"https:\/\/stage.surver.nl\/en\/managed-hosting\/woocommerce\/\">Managed WooCommerce Hosting<\/a>. If your store is still slow, read <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/slow-woocommerce-online-store\/\">Slow WooCommerce online store<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What we handle as standard at Surver saves you a significant amount of this work. All of our shared hosting plans <a href=\"https:\/\/stage.surver.nl\/en\/managed-hosting\/wordpress\/\">Managed WordPress Hosting<\/a> run on LiteSpeed servers with NVMe storage, and LiteSpeed Cache is the right plugin for that. When setting up a new package, we install WordPress via Installatron with LiteSpeed Cache included. If you\u2019re installing it yourself, you\u2019ll need to add the plugin yourself. If caching is set up correctly and your site is still slow, then <a href=\"https:\/\/stage.surver.nl\/en\/knowledge-base\/causes-of-a-slow-wordpress-website\/\">the cause lies elsewhere<\/a>. Then follow the complete guide or let us take a look with <a href=\"https:\/\/stage.surver.nl\/en\/services\/wordpress-optimization\/\">WordPress Speed Optimization<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"veelgestelde-vragen\">Frequently Asked Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Which is better, WP Rocket or LiteSpeed Cache?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That depends on your web server. On a LiteSpeed server, you should use LiteSpeed Cache, since it works in conjunction with the server cache. Otherwise, WP Rocket (paid) is a great choice, as is the free WP Super Cache.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can caching break my site?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While not a permanent issue, improperly configured caching can display outdated pages, break the layout, or cause the shopping cart to malfunction. A broken layout is often caused by minification or lazy loading, features that caching plugins often include. First, clear the cache, and then revert the settings one by one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does Surver have built-in caching?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. All of Surver's shared hosting plans run on LiteSpeed servers with LiteSpeed Cache, and OPcache is enabled by default. Surver offers object caching with Redis on Surver Cloud.<\/p>","protected":false},"excerpt":{"rendered":"<p>Elk snelheidsadvies zegt &#8220;installeer een cachingplugin&#8221;, maar welke, en wat doet die eigenlijk? WordPress kent vier cachinglagen: browsercaching, paginacaching, object caching voor databasequery&#8217;s en servercaching zoals LiteSpeed. Paginacaching levert de grootste winst, object caching is vooral zinvol voor webshops en ingelogde gebruikers. Hieronder lees je welke lagen je nodig hebt en hoe je caching instelt [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":20475,"template":"","kennisbank_categorieen":[56],"class_list":["post-20412","kennisbank","type-kennisbank","status-publish","has-post-thumbnail","hentry","kennisbank_categorieen-optimalisatie"],"acf":[],"_links":{"self":[{"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/kennisbank\/20412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/kennisbank"}],"about":[{"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/types\/kennisbank"}],"author":[{"embeddable":true,"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/media\/20475"}],"wp:attachment":[{"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/media?parent=20412"}],"wp:term":[{"taxonomy":"kennisbank_categorieen","embeddable":true,"href":"https:\/\/stage.surver.nl\/en\/wp-json\/wp\/v2\/kennisbank_categorieen?post=20412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}