How to Add Expires Header in WordPress with This Simple Method
Welcome guys. I’m Mukesh. Today we are going to learn how to add Expires header to the WordPress site. Here is a quick and easy tutorial to add Expire header to the website. So let’s see how we add Expire header in WordPress.
Before we start, we some talk about what is the importance
Importance of Expires Header
Finally, the main importance of the Expires Header is to reduce the load on-site and making the site faster.
Click here to know other methods of speed up WordPress
How to Add Expires Header in WordPress
Here are two methods of add Expire header to WordPress. One is adding by Plugin and the other is adding by manually add code in the htaccess file.
1. Far Future Expiry Header Plugin
This is a very easy method to add Expires header. Just install the ‘Far Future Expiry Header‘ plugin to WordPress and activate this.
How do you do this? Follow this step:
- Go to your dashboard
- Click on Add New in the plugin section
- Search Far Future Expiry Header and click on install
- Activate the plugin
- After activate, Go to FarFutureExpiry option in Setting option.
- Click on ‘Enable Far Future Expiration’.
- Enter the value 30 in Number of the Day option.
- Save this.
Great job, you have all done. Now, Expire Header has been added to your website.
If you down want to install any plugin then this is another method to add Expire header without a plugin.
2. Add Expires Header htaccess
This is an advanced option to add Expires header to WordPress. In this method, we need to insert a code in the htaccess file. Remember that before you edit the htaccess file, you have to back up this. So let start:
Access your website via FTP. Find the htaccess file and open it. In the htaccess file, add the following code and save it.
So these are two easy methods of adding Expire header in WordPress of our blog. If you have any problem with this, you can free to ask us in the comment section. Good bay.
YOU MAY LIKE: How to add Web Push Notification on WordPress