Hi!
I used like 3 different WP plugins but none of them worked so far… so I guess I’ll have to do it manually on my server
I haven’t found any tutorial though so that’s why I’m asking you where and how can I setup expire headers for css, png, jpg,… basically everything (as long as it’s useful)
Thanks :)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Try something like this (note: this needs the mod_expires module. Enable it with “a2enmod expires” if you’re using Ubuntu or Debian - afterwards restart Apache):
Thanks works like charm !!!
The issue is resolved (I don’t have httpd.conf but apache2.conf!) it just didn’t have the right permission…
Thank you!
Ok so I tried many times but it still doesn’t work:
When I add the mod expires lines I get a 500 error but if I remove it everything works fine…
I did sudo a2enmod expires and sudo a2enmod header and they are both enabled…
Any explanation? I’ve head it can be something wrong in my httpd.conf but I don’t have that file.
Thank you :)
Before doing anything, can you confirm that I have to put these lines in .htaccess and not in a VirtualHost configuration?