{"id":9293,"date":"2023-12-13T04:29:11","date_gmt":"2023-12-13T04:29:11","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?post_type=manual_kb&#038;p=9293"},"modified":"2025-11-22T04:48:46","modified_gmt":"2025-11-22T04:48:46","slug":"fix-leverage-browser-caching","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/fix-leverage-browser-caching","title":{"rendered":"Fix Leverage Browser Caching Warning in WordPress"},"content":{"rendered":"\n<p>In this article, we will learn how to fix leverage browser caching warnings in WordPress to improve\/speed up your WordPress site and deliver a superior experience to your visitors.<\/p>\n\n\n\n<p>First of all, we need to know what is browser caching in WordPress. So it is basically a way to improve your website loading speeds by creating multiple requests between the browser and your WordPress hosting server.<\/p>\n\n\n\n<p>Actually, browser cache stores a copy of your webpages locally and allow the browsers to load common files faster when the user visits your webpage a second time.<\/p>\n\n\n\n<p>You will receive a browser caching warning when you don&#8217;t have browser caching enabled and you have set up your caching in the wrong way.<\/p>\n\n\n\n<p>We can fix leverage browser caching warnings in two ways.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>By adding a WordPress Plugin<\/li>\n\n\n\n<li>By adding the code manually<\/li>\n<\/ul>\n\n\n\n<p>Here we are using the Leverage Browser Caching plugin which is the best and user friendly for beginners. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"by-adding-a-wordpress-plugin\"><strong> <span style=\"font-size: revert; background-color: initial;\">By adding a WordPress Plugin<\/span> <\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login into your wordpress dashboard and go to <strong>Plugins<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image.png\" alt=\"\" class=\"wp-image-3537\" width=\"574\" height=\"606\"><\/figure>\n\n\n\n<p>2. Click &#8220;<strong>Add New<\/strong>&#8220;, search for &#8220;<strong>Leverage Browser Caching<\/strong>&#8221; and click on <strong>Install Now<\/strong> button.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"757\" height=\"426\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/image.png\" alt=\"\" class=\"wp-image-3729\"><\/figure>\n\n\n\n<p>3. Click <strong>&#8220;Activate<\/strong>&#8221; to activate the plugin.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"441\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/image-1.png\" alt=\"\" class=\"wp-image-3730\"><\/figure>\n\n\n\n<p>4. After activating the plugin, check your website again and you will find that warning has been fixed.<\/p>\n\n\n\n<h2 class=\"has-text-align-left wp-block-heading\" class=\"has-text-align-left wp-block-heading\" id=\"by-adding-the-code-manually\"><strong> By adding the code manually<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login to your control panel. Here I am taking DirectAdmin panel. After login, scroll down and click on &#8220;<strong>File Manager<\/strong>&#8221; icon.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/image-14-edited.png\" alt=\"\" class=\"wp-image-3732\" width=\"585\" height=\"439\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/09\/image-14-edited.png 785w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/09\/image-14-edited-768x576.png 768w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/figure>\n\n\n\n<p>2. Navigate to the <strong>domain<\/strong> and double-click on it. Select your <strong>domain name<\/strong>(if you are having multiple domains) then double-click on the <strong>public_html<\/strong> folder.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-16.png\" alt=\"\" class=\"wp-image-3573\" width=\"772\" height=\"446\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-16.png 1043w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-16-768x444.png 768w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>3. Here, you will find the .htaccess file. Right-click on this file and click&nbsp;<strong>Edit.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"603\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-17.png\" alt=\"\" class=\"wp-image-3574\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-17.png 773w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image-17-768x599.png 768w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><\/figure>\n\n\n\n<p>4. Copy and paste the following lines of codes into it at the bottom.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n#Customize expires caching start - adjust the period according to your needs\n&lt;IfModule mod_expires.c&gt;\n  FileETag MTime Size\n  AddOutputFilterByType DEFLATE text\/plain text\/html text\/xml text\/css application\/xml application\/xhtml+xml application\/rss+xml application\/javascript application\/x-javascript\n  ExpiresActive On\n  ExpiresByType text\/html &quot;access 600 seconds&quot;\n  ExpiresByType application\/xhtml+xml &quot;access 600 seconds&quot;\n  ExpiresByType text\/css &quot;access 1 month&quot;\n  ExpiresByType text\/javascript &quot;access 1 month&quot;\n  ExpiresByType text\/x-javascript &quot;access 1 month&quot;\n  ExpiresByType application\/javascript &quot;access 1 month&quot;\n  ExpiresByType application\/x-javascript &quot;access 1 month&quot;\n  ExpiresByType application\/x-shockwave-flash &quot;access 1 month&quot;\n  ExpiresByType application\/pdf &quot;access 1 month&quot;\n  ExpiresByType image\/x-icon &quot;access 1 year&quot;\n  ExpiresByType image\/jpg &quot;access 1 year&quot;  \n  ExpiresByType image\/jpeg &quot;access 1 year&quot;\n  ExpiresByType image\/png &quot;access 1 year&quot;\n  ExpiresByType image\/gif &quot;access 1 year&quot;\n  ExpiresDefault &quot;access 1 month&quot;\n&lt;\/IfModule&gt;\n#Expires caching end\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>In this article, we will learn how to fix leverage browser caching warnings in WordPress to improve\/speed up your WordPress [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6877,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[],"tags":[],"class_list":["post-9293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/Fix-Leverage-Browser-Caching-Warning-in-WordPress-01.jpg","author_info":{"display_name":"YouStable","author_link":"https:\/\/www.youstable.com\/blog\/author\/youstable"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=9293"}],"version-history":[{"count":2,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9293\/revisions"}],"predecessor-version":[{"id":15819,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9293\/revisions\/15819"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/6877"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=9293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=9293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=9293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}