Default Apache configuration for WordPress performance optimizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Keep-Alive | |
<IfModule mod_headers.c> | |
Header set Connection Keep-Alive | |
</IfModule> | |
# Compress Transfer | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE application/atom+xml \ | |
application/javascript application/json application/ld+json \ | |
application/rss+xml application/vnd.ms-fontobject \ | |
application/x-font-ttf application/x-web-app-manifest+json \ | |
application/xhtml+xml application/xml font/opentype \ | |
image/svg+xml image/x-icon \ | |
text/css text/html text/plain text/vtt text/x-component text/xml | |
</IfModule> | |
# Cache static content | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 week" | |
ExpiresByType text/css "access plus 1 year" | |
ExpiresByType application/json "access plus 0 seconds" | |
ExpiresByType application/ld+json "access plus 0 seconds" | |
ExpiresByType application/xml "access plus 0 seconds" | |
ExpiresByType text/xml "access plus 0 seconds" | |
ExpiresByType image/x-icon "access plus 1 week" | |
ExpiresByType text/x-component "access plus 1 month" | |
ExpiresByType text/html "access plus 0 seconds" | |
ExpiresByType application/javascript "access plus 1 year" | |
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" | |
ExpiresByType text/cache-manifest "access plus 0 seconds" | |
ExpiresByType audio/ogg "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType video/mp4 "access plus 1 month" | |
ExpiresByType video/ogg "access plus 1 month" | |
ExpiresByType video/webm "access plus 1 month" | |
ExpiresByType application/atom+xml "access plus 1 hour" | |
ExpiresByType application/rss+xml "access plus 1 hour" | |
ExpiresByType application/font-woff "access plus 1 month" | |
ExpiresByType application/vnd.ms-fontobject "access plus 1 month" | |
ExpiresByType application/x-font-ttf "access plus 1 month" | |
ExpiresByType font/opentype "access plus 1 month" | |
ExpiresByType image/svg+xml "access plus 1 month" | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment