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 :)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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):
ExpiresActive on
ExpiresDefault "access plus 30 seconds"
ExpiresByType text/html "access plus 15 days"
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/js "access plus 1 months"
ExpiresByType text/javascript "access plus 1 months"
</IfModule>```
I hope it works for you :). Please let me know if it works!
The issue is resolved (I don’t have httpd.conf but apache2.conf!) it just didn’t have the right permission…
Thank you!
Thank you :)
Before doing anything, can you confirm that I have to put these lines in .htaccess and not in a VirtualHost configuration?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.