add expires headers wordpress

By | February 27, 2018

add expires headers wordpress,How to Apply Expires Header to WordPress to Optimize Cache,WordPress Far Future Expiration Plugin,Add Expires header to your htaccess file

add expires headers wordpress

Expire Headers is letting your browser to cache your website content and request them only after the time specified in that rule expires.

What is browser caching and expires headers?

The point of using browser caching and expiry headers is to reduce the number of HTTP requests, which improves the performance for your returning visitors.

The first time someone visits your site, their browser will fetch all your images, css files, javascript files, etc. Normally that happens every time the same visitor comes back to your site.

With Expires headers you tell your website visitor’s browser that the files you specify are not changing until after a certain time, for example a month.

This means that the browser doesn’t have to to re-fetch images, css, javascript etc every time your visitor comes back to your site.

Check your current website performance

Before you start, test your current status with Google Page Speed tool and Yahoo Yslow.

I personally prefer using because it shows you both Google’s and Yahoo’s page speed tools. It also updates instantly, so you can get an updated result straight after you’ve implemented your changes.


If you want to set Expire Headers for all of your image,js and css file you have to open and edit your .htaccess file and the following rule:

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"

How add expires headers wordpress with Plugin

Far Future Expiry Plugin

What are the best WordPress Themes in 2017

This plugin offers a few lightweight features to speed up your WordPress site without much hassle.
When the feature is enabled, this plugin will modify your .htaccess file by inserting code which will add expires headers for common static file types.

Expiry header specifies a time far enough in the future so that browsers won’t try to re-fetch images, CSS, javascript etc files that haven’t changed (this reduces the number of HTTP requests) and hence the performance improvement on subsequent page views.


Download  Click Here

Leave a Reply

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