Quick WordPress/website performance tweaks

November 27, 2011

Add some expires data and compress stuff. Add this to your .htaccess file and be done, or your httpd.conf file and then restart apache.


FileETag MTime Size

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/x-php
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On

ExpiresByType image/jpeg "access plus 3 month"
ExpiresByType image/gif "access plus 3 month"
ExpiresByType image/png "access plus 3 month"
ExpiresByType image/vnd.microsoft.icon "access plus 3 month"
ExpiresByType text/css "access plus 3 month"
ExpiresByType application/x-javascript "access plus 3 month"
</IfModule>