How do I enable Mod_PageSpeed on my cPanel hosting account?


The Mod_PageSpeed module is available on all our web hosting accounts, but it is turned off by default to ensure that it doesn't inadvertently disrupt your website. Activating it is a straightforward process, requiring only a couple of lines to be added to your .htaccess file.

You can read how to How to Edit .htaccess File via the cPanel Filemanager? and you will just need to add the following to activate PageSpeed

<IfModule pagespeed_module>
ModPagespeed on
</IfModule>

The .htaccess file can be used to control most of the directives in mod_pagespeed. You can see a list of available directives here: Directives that can be used with .htaccess and <Directory> scope

At the time of writing (October 2023 and version 1.14.36) this list of available directives are:

  • ModPagespeedAllow
  • ModPagespeedAvoidRenamingIntrospectiveJavascript
  • ModPagespeedBeaconUrl
  • ModPagespeedCombineAcrossPaths
  • ModPagespeedCssImageInlineMaxBytes
  • ModPagespeedCssInlineMaxBytes
  • ModPagespeedCssOutlineMinBytes
  • ModPagespeedDisableFilters
  • ModPagespeedDisallow
  • ModPagespeedDomain
  • ModPagespeedEnableFilters
  • ModPagespeedImageInlineMaxBytes
  • ModPagespeedImageLimitOptimizedPercent
  • ModPagespeedImageLimitResizeAreaPercent
  • ModPagespeedJpegRecompressionQuality
  • ModPagespeedJsInlineMaxBytes
  • ModPagespeedJsOutlineMinBytes
  • ModPagespeedLowercaseHtmlNames
  • ModPagespeedMapOriginDomain
  • ModPagespeedMapRewriteDomain
  • ModPagespeedMaxInlinedPreviewImagesIndex
  • ModPagespeedMinImageSizeLowResolutionBytes
  • ModPagespeedModifyCachingHeaders
  • ModPagespeedRetainComments
  • ModPagespeedRewriteLevel

If you need any support with either activating pageSpeed or optimising your website please raise a support ticket and we will be happy to help.


Was this answer helpful?

One email a month. Endless business benefits.

Don't miss out on WMTWWFY — the newsletter that keeps your website fast, safe, and visible.

« Back
Spinner
aluminium-anthropoid Security Check