Skip to content

Instantly share code, notes, and snippets.

@fieldoffice
Last active September 17, 2016 10:29
Show Gist options
  • Save fieldoffice/b044054722a205a8b1bec702120f1758 to your computer and use it in GitHub Desktop.
Save fieldoffice/b044054722a205a8b1bec702120f1758 to your computer and use it in GitHub Desktop.
Additional WordPress Config Options
.htaccess
/*
Disable ETags
*/
Header unset ETag
FileETag None
/*
Add Expire Dates
Adds expire headers of 1 year for all file types, except HTML file type (1 day)
Requires mod_expires
*/
ExpiresActive On
ExpiresDefault "access plus 1 year"
ExpiresByType text/html "access plus 1 day"
/*
Compress Text Files - GZip Compression
Requires mod_deflate
*/
<FilesMatch ".(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
wp-config.php
/*
Limit the amount of revisions that WordPress stores
*/
define( 'WP_POST_REVISIONS', 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment