Hosting + Ai Website Builder + Free Domain (3 Month Free Credit)
Shop Today

Fix Leverage Browser Caching Warning in WordPress

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.

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.

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.

You will receive a browser caching warning when you don’t have browser caching enabled and you have set up your caching in the wrong way.

We can fix leverage browser caching warnings in two ways.

  • By adding a WordPress Plugin
  • By adding the code manually

Here we are using the Leverage Browser Caching plugin which is the best and user friendly for beginners.

By adding a WordPress Plugin

  1. Login into your wordpress dashboard and go to Plugins.
Fix Leverage Browser Caching Warning in WordPress 1

2. Click “Add New“, search for “Leverage Browser Caching” and click on Install Now button.

Fix Leverage Browser Caching Warning in WordPress 2

3. Click “Activate” to activate the plugin.

Fix Leverage Browser Caching Warning in WordPress 3

4. After activating the plugin, check your website again and you will find that warning has been fixed.

By adding the code manually

  1. Login to your control panel. Here I am taking DirectAdmin panel. After login, scroll down and click on “File Manager” icon.
Fix Leverage Browser Caching Warning in WordPress 4

2. Navigate to the domain and double-click on it. Select your domain name(if you are having multiple domains) then double-click on the public_html folder.

Fix Leverage Browser Caching Warning in WordPress 5

3. Here, you will find the .htaccess file. Right-click on this file and click Edit.

Fix Leverage Browser Caching Warning in WordPress 6

4. Copy and paste the following lines of codes into it at the bottom.

#Customize expires caching start - adjust the period according to your needs
<IfModule mod_expires.c>
  FileETag MTime Size
  AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
  ExpiresActive On
  ExpiresByType text/html "access 600 seconds"
  ExpiresByType application/xhtml+xml "access 600 seconds"
  ExpiresByType text/css "access 1 month"
  ExpiresByType text/javascript "access 1 month"
  ExpiresByType text/x-javascript "access 1 month"
  ExpiresByType application/javascript "access 1 month"
  ExpiresByType application/x-javascript "access 1 month"
  ExpiresByType application/x-shockwave-flash "access 1 month"
  ExpiresByType application/pdf "access 1 month"
  ExpiresByType image/x-icon "access 1 year"
  ExpiresByType image/jpg "access 1 year"  
  ExpiresByType image/jpeg "access 1 year"
  ExpiresByType image/png "access 1 year"
  ExpiresByType image/gif "access 1 year"
  ExpiresDefault "access 1 month"
</IfModule>
#Expires caching end

YouStable

Power up your business website with YouStable India’s affordable unlimited web hosting services and meet your online success! YouStable is not just a brand that provides hosting services to clients. The quality of services a customer gets from us is unparalleled and our clients know it.

Leave a Comment

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

Scroll to Top