Wordpress LScache Plugin: ExpiresDefault ? is this the correct way to do it?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi, I enabled browser caching in my litespeed cache and didnt touch anything until I went to .htaccess to add the Litespeed .htaccess rule as recommended by my webhost. However I got a message that I shouldnt be using ExpireDefault ? which was something I didnt touch previously. After reading your guide, may I know if this addition of ExpiresByType the correct way to do things? Or is redundant because the ExpiresByType is already nested within FilesMatch? ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END NON_LSCACHE # BEGIN Far Future Expiration Plugin ExpiresActive on ExpiresByType text/html access plus 0 seconds ExpiresDefault access plus 365 days # END Far Future Expiration Plugin # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] Expand If it helps, this is the entire .htaccess: # BEGIN All In One WP Security #AIOWPS_BLOCK_SPAMBOTS_START RewriteEngine On RewriteCond % REQUEST_METHOD POST RewriteCond % REQUEST_URI ^(. )?wp-comments-post .php(. )$ RewriteCond % HTTP_REFERER !^http(s)?://pewpewpew .cc [NC,OR] RewriteCond % HTTP_USER_AGENT ^$ RewriteRule . http://127.0.0.1 [L] #AIOWPS_BLOCK_SPAMBOTS_END # END All In One WP Security # BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## RewriteEngine on CacheLookup on RewriteRule . - [E=Cache-Control:no-autoflush] RewriteRule ^min/ w+ .(css|js) - [E=cache-control:no-vary] ### marker CACHE RESOURCE start ### RewriteRule wp-content/. /[^/] (responsive|css|js|dynamic|loader|fonts) .php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ### ### marker FAVICON start ### RewriteRule favicon .ico$ - [E=cache-control:max-age=86400] ### marker FAVICON end ### ### marker CORS start ### Header set Access-Control-Allow-Origin ### marker CORS end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE # BEGIN NON_LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## ### marker BROWSER CACHE start ### ExpiresActive on ExpiresByType application/pdf A2592000 ExpiresByType image/x-icon A2592000 ExpiresByType image/vnd.microsoft.icon A2592000 ExpiresByType image/svg+xml A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 ExpiresByType image/gif A2592000 ExpiresByType image/webp A2592000 ExpiresByType video/ogg A2592000 ExpiresByType audio/ogg A2592000 ExpiresByType video/mp4 A2592000 ExpiresByType video/webm A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript A2592000 ExpiresByType application/javascript A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType application/x-font-ttf A2592000 ExpiresByType application/x-font-woff A2592000 ExpiresByType application/font-woff A2592000 ExpiresByType application/font-woff2 A2592000 ExpiresByType application/vnd.ms-fontobject A2592000 ExpiresByType font/ttf A2592000 ExpiresByType font/woff A2592000 ExpiresByType font/woff2 A2592000 ### marker BROWSER CACHE end ### ### marker MINIFY start ### RewriteEngine on RewriteCond % DOCUMENT_ROOT % REQUEST_URI ^(. )/min/( w+) .(css|js)$ RewriteCond %1/wp-content/cache/$2/$1.$2 -f RewriteRule min/( w+) .(css|js) wp-content/cache/$2/$1.$2 [L] ### marker MINIFY end ### ### Hawkhost Litespeed ### CacheEnable public / RewriteEngine on RewriteCond % REQUEST_METHOD ^(HEAD|GET)$ RewriteCond % REQUEST_URI !^/(wp-admin|wp-login.php|wp-cron.php) RewriteRule . - [E=Cache-Control:max-age=120] ### Hawkhost Litespeed end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END NON_LSCACHE # BEGIN Far Future Expiration Plugin ExpiresActive on ExpiresByType text/html access plus 0 seconds ExpiresDefault access plus 365 days # END Far Future Expiration Plugin # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] # END WordPressExpand Thank you! This topic was modified 4 years, 5 months ago by darknezx. Hi, According to apache doc This directive sets the default algorithm for calculating the expiration time for all documents in the affected realm. It can be overridden on a type-by-type basis by the ExpiresByType directive. See the description of that directive for details about the syntax of the argument, and the alternate syntax description as well. bytype will override bydefault also I feel you shouldnt enable 2 same feature from different plugin , it may create unforeseeable conflict and side affect? Best regards, Thanks! In that case Ill remove the hawk host part. Since the Plugin came without the ExpiresByType line, should I just remove it? It was recommended by the litespeed cache guide but didnt come with the Plugin settings. Hi, In advance tab , there is an option called browser cache , I believe the codes you see , was added by this option. Best regards Thanks, I deleted that line eventually and havent seen any problems! Hi, Glad to know, I will mark this topic as resolved , please let us know if you have any further questions. Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference