How to set up Server Side Caching and Compression — Dedicated and VPS

I’ll be going over how to set up server side caching and compression on your account.  You’ll want to be able to access your .htaccess as well as your WHM in order to do this.

First log into your WHM

Once logged into your WHM, in the top left search bar type service and then go to the service configuration.


Once on Service configuration go to Apache Configuration


Go to Include Editor


Once in Include Editor, go under Post VirtualHost Include select All Versions


Now this will open up a text box, and you’ll want to paste this content in it:

[snippet id=”21″]

Then click on save.

And finally you just need to add this to your .htaccess

RewriteRule ^(css|js)/(.*)\.[0-9]+\.(.*)$ /$1/$2.$3 [L]

And you are good to go.  Do some tests at and see the magic.

Posted in Archived Posts and tagged .