{"id":22554,"date":"2022-02-11T10:58:33","date_gmt":"2022-02-11T10:58:33","guid":{"rendered":"https:\/\/testftechnology.kinsta.cloud\/blog\/wp-rocket-basics\/"},"modified":"2026-12-06T08:42:27","modified_gmt":"2026-12-06T08:42:27","slug":"wp-rocket-basics","status":"publish","type":"post","link":"https:\/\/testftechnology.kinsta.cloud\/en\/blog\/wp-rocket-basics\/","title":{"rendered":"WP Rocket Basics"},"content":{"rendered":"<p>It goes without saying &#8211; <em>though not for everyone, apparently!<\/em> &#8211; that a site&#8217;s <strong>speed<\/strong> is a <strong>fundamental requirement<\/strong> for <strong>winning<\/strong> and <strong>keeping<\/strong> visitors (<em>read also &#8220;buyers&#8221;<\/em>).<\/p>\n<p><a href=\"https:\/\/wp-rocket.me\/it\/\" target=\"_blank\" rel=\"noopener\"><strong>WP Rocket<\/strong><\/a> is a widely used commercial solution for managing some of the optimisation parameters of a <strong>WordPress<\/strong> site.<\/p>\n<p>In this article &#8211; the first in a series &#8211; we will focus on the basic features of the <em>plugin<\/em>, which start on first activation. We can divide them into <strong>automatic<\/strong> (not visible in the settings) and <strong>default<\/strong> (easily managed).<\/p>\n<p>WP Rocket and the server<br \/>\nIt is strongly recommended to find out about the integration between <strong>WP Rocket <\/strong>and your own <strong><em>server<\/em><\/strong>!<\/p>\n<p>Take the case of <a href=\"https:\/\/kinsta.com\/\" target=\"_blank\" rel=\"noopener\">Kinsta<\/a>, which we use extensively: since version 3.0 of WP Rocket, <strong>GZIP compression <\/strong>and <strong>page caching <\/strong>are<strong> automatically disabled <\/strong>in the plugin and <strong>handled by the <\/strong><strong><em>server<\/em><\/strong>.<br \/>\nFeatures such as the <strong>cache lifespan<\/strong> may be <strong>irrelevant<\/strong>. Others, such as cache <strong>preloading<\/strong>, may even be <strong>discouraged<\/strong>!<br \/>\nFor the specifics, see <a href=\"https:\/\/kinsta.com\/blog\/wp-rocket\/\" target=\"_blank\" rel=\"noopener\">this update<\/a> (from January 2022).<br \/>\n<em>We do not rule out covering the topic in one of the next articles.<\/em><\/p>\n<h2>1 &#8211; Automatic features<\/h2>\n<p>When <strong>WP Rocket<\/strong> is activated, some features start automatically, without being visible in the settings. The most important are:<\/p>\n<ol>\n<li><b>Page <em>cache<\/em><\/b>,<\/li>\n<li>Expiry settings for the <b><em>browser<\/em> cache<\/b>,<\/li>\n<li><b>GZIP<\/b> compression.<\/li>\n<\/ol>\n<p>The full list is given in <a href=\"https:\/\/docs.wp-rocket.me\/article\/59-getting-started\" target=\"_blank\" rel=\"noopener\">this article<\/a>.<\/p>\n<p>Let&#8217;s look at the 3 mentioned in detail.<\/p>\n<h3>1.1 &#8211; Page cache<\/h3>\n<p>Simply put, it consists of <strong>storing the code of a page<\/strong>.<\/p>\n<p>On the <strong>first view<\/strong> by any user (or during the <a href=\"https:\/\/docs.wp-rocket.me\/article\/8-how-the-cache-is-preloaded\" target=\"_blank\" rel=\"noopener\"><strong>preloading<\/strong><\/a> phase, as we shall see), <strong>WordPress<\/strong> generates the <strong>HTML code<\/strong>. This will be available for all subsequent views, by any user, until it expires.<\/p>\n<p>It goes without saying that using static HTML means a <strong>reduced load on the server<\/strong> (on both PHP and MySQL) and <strong>greater speed<\/strong>.<\/p>\n<p>The cache is cleared in full or in part:<\/p>\n<ul>\n<li>When it expires;<\/li>\n<li>When content is published\/updated (together with the <em>home page<\/em> and the <em>archive pages<\/em> of the taxonomies the page belongs to);<\/li>\n<li>When WP Rocket&#8217;s settings are changed.<\/li>\n<\/ul>\n<h3>1.2 &#8211; Expiry settings for the <em>browser cache<\/em><\/h3>\n<p>The <em>browser cache<\/em> is the classic <strong>storage of files in the user&#8217;s<\/strong> <strong><em>browser<\/em><\/strong>. It is normally always active (unless inhibited) for any static content on the web.<\/p>\n<p><strong>Site content<\/strong> may need updating at <strong>different intervals<\/strong>.<\/p>\n<p>For example, the company logo will not be changed often. It can be stored in the user&#8217;s <em>browser<\/em>, with the expiry set to one week. If the file changed, it would take at most a week to be downloaded again.<\/p>\n<p>This is where <strong>WP Rocket<\/strong> comes in, adjusting the expiry times and optimising them according to the content. It should be said that the configuration on Apache, being able to make use of changes to .htaccess, will be more complete. It is also possible to <a href=\"https:\/\/docs.wp-rocket.me\/article\/37-nginx-configuration-for-wp-rocket\" target=\"_blank\" rel=\"noopener\">act manually<\/a> to achieve the same results on NGINX.<\/p>\n<p>As a result, if the user visits several pages, or visits the same page several times, <strong>bandwidth and HTTP requests<\/strong> are reduced and <strong>speed increases.<\/strong><\/p>\n<p>Browser cache<br \/>\nThe <em>browser cache <\/em>only concerns <strong>content served from the domain<\/strong>; NOT third-party content (Google, Facebook, etc.).<\/p>\n<h3>1.3 &#8211; GZIP compression<\/h3>\n<p><strong>GZIP<\/strong> is a <strong>compression format<\/strong> that can be applied to content served over the network (pages, stylesheets, JavaScript), thereby reducing transfer times.<\/p>\n<p>GZIP and domains<br \/>\nGZIP compression can only be applied to <strong>content served from the domain<\/strong>; not to third-party content (Google, Facebook, etc.).<\/p>\n<p style=\"color: #343434; font-family: var(--global-font-support); font-size: 14px; font-variant: inherit; font-stretch: inherit; line-height: 24px; margin-bottom: 0px; cursor: text; counter-reset: list-0 0 list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; transition: none 0s ease 0s !important;\">WP Rocket enables GZIP compression<b> only on Apache<\/b>, by modifying .htaccess. For <b>NGINX<\/b> and <b>IIS<\/b>, you need to contact the <b>provider directly<\/b>.<\/p>\n<h2>2 &#8211; Default features<\/h2>\n<p>Some features, active by default, can be <strong>managed in the settings<\/strong>. These include:<\/p>\n<ol>\n<li><strong>Mobile cache<\/strong>;<\/li>\n<li><strong>Cache expiry<\/strong> of <strong>10 hours<\/strong>;<\/li>\n<li><strong>Cache preloading<\/strong>;<\/li>\n<li><strong>Link preloading<\/strong>;<\/li>\n<li><strong>Reduced activity<\/strong> of the <strong><em>Heartbeat<\/em><\/strong> API.<\/li>\n<\/ol>\n<p>Let&#8217;s go through them briefly.<\/p>\n<h3>2.1 &#8211; Mobile cache<\/h3>\n<p>Simply, it is <strong>the application of the<\/strong> <strong><em>cache<\/em><\/strong> <strong>on &#8220;mobile&#8221; devices<\/strong>, where WP Rocket uses this term to mean <strong>phones only<\/strong>.<\/p>\n<p>It is generally always advisable to enable it, provided <strong>the site is responsive<\/strong>.<\/p>\n<h3>2.2 &#8211; Cache expiry<\/h3>\n<p>The <strong>10-hour lifespan<\/strong> of the <strong><em>page cache<\/em><\/strong> is a starting point.<\/p>\n<p>If updates are frequent, it may be reasonable to <strong>lower the time<\/strong>, doing so gradually.<\/p>\n<h3>2.3 &#8211; Cache preloading<\/h3>\n<p><strong>Preloading the<\/strong> <strong><em>page cache<\/em><\/strong> means that it is <strong>generated automatically<\/strong> by WP Rocket, regardless of <strong>user interactions<\/strong>.<\/p>\n<p>If preloading is switched off, each page will need <strong>at least one visit<\/strong> before it can be placed in the <em>cache<\/em>. As a result, the first user will always see it more slowly.<\/p>\n<h3>2.4 &#8211; Link preloading<\/h3>\n<p style=\"font-size: 14px; margin-bottom: 0px; color: #343434; font-family: var(--global-font-support); font-variant: inherit; font-stretch: inherit; line-height: 24px; cursor: text; counter-reset: list-0 0 list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; transition: none 0s ease 0s !important;\">Link preloading improves the interaction time perceived by the user browsing the site.<\/p>\n<p style=\"font-size: 15px; font-style: normal; font-weight: 400;\">If the user hovers over a link for more than 100ms, the HTML content of the corresponding page is preloaded in the background.<\/p>\n<p>Browser limitation<br \/>\nFeature active only on <strong>Chrome and Chromium browsers<\/strong>.<\/p>\n<p>Link preloading and scores<br \/>\nThe option does not improve PageSpeed, Pingdom or GT Metrix scores, but it ensures <strong>smoother browsing<\/strong>.<\/p>\n<h3>2.5 &#8211; Reduced activity of the <em>Heartbeat<\/em> API<\/h3>\n<p>The <strong>Heartbeat<\/strong> <strong>API<\/strong> is a WordPress default. It provides a connection <strong>for transferring information in real time between<\/strong> <strong><em>server<\/em><\/strong> <strong>and<\/strong> <strong><em>browser<\/em><\/strong>. For example, it is involved in autosaves, admin notifications, locking <em style=\"font-size: 15px; background-color: var(--ast-global-color-5); color: var(--ast-global-color-3);\">posts<\/em> while a user is editing them, and much more.<\/p>\n<p>At an interval of the order of seconds, the API fires a series of commands using the <em>admin-ajax.php<\/em> file to communicate with the outside.<\/p>\n<p>Although fundamental, it can lead to high CPU usage.<\/p>\n<p><strong>WP Rocket reduces its activity by default<\/strong>, limiting it to <strong>one start every 2 minutes<\/strong> (<i>Reduce activity<\/i>).<\/p>\n<h2>3 &#8211; A word on the <em>user cache<\/em><\/h2>\n<p>This is a basic feature that is <strong>switched off<\/strong>, but it deserves a mention.<\/p>\n<p>It consists of creating a separate cache for each user who logs in to the site. The option has no effect on external visitors.<\/p>\n<p>It is therefore useful for sites that include private areas.<\/p>\n<h2>4 &#8211; It&#8217;s only the beginning<\/h2>\n<p>We have only covered the <strong>basic features of WP Rocket<\/strong>, without going into too much detail. Soon we will tackle aspects such as <strong>media<\/strong>, <strong>preloading<\/strong>, <strong>external content<\/strong>, and much more.<\/p>\n<p><i>Stay tuned over the coming weeks; new articles are on the way!<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It goes without saying &#8211; though not for everyone, apparently! &#8211; that a site&#8217;s speed is a fundamental requirement for winning and keeping visitors (read also &#8220;buyers&#8221;). WP Rocket is a widely used commercial solution for managing some of the optimisation parameters of a WordPress site. In this article &#8211; the first in a series [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21355,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[68],"tags":[],"class_list":["post-22554","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance"],"acf":[],"_links":{"self":[{"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/posts\/22554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/comments?post=22554"}],"version-history":[{"count":0,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/posts\/22554\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/media\/21355"}],"wp:attachment":[{"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/media?parent=22554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/categories?post=22554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/testftechnology.kinsta.cloud\/en\/wp-json\/wp\/v2\/tags?post=22554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}