I'm trying to optimise a WordPress site of mine - Type & Music based on reports I've been getting from GTmetrix. One of the things I'm being advised to do is add expires headers and leverage browser caching. I may be wrong, but I assume these are kind of the same thing?
Anyways, I've been looking at tutorials online such as How to Add Far Future Expires Headers to Your WordPress Site and How to Leverage Browser Caching in WordPress via .htaccess from Thomas Griffen Media, which all seem to be just a case of copy and paste (I am aware that the settings are specific to each site though, depending how how regularly you update/edit certain content and files) but these settings never seem to register at all when I retest the site.
Here are the contents of my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month”
ExpiresByType image/jpeg "access 1 month”
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 week”
ExpiresByType text/css "access 1 week”
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##
I have since installed the Quick Cache plugin too, but to the best of my knowledge that doesn't really conflict, especially since the settings in my htaccess file aren't registering in the first place.
Any help would be greatly appreciated as I've found nothing of help myself.