WebHostingPeople Blog

How Can We Help?

PageSpeed on cPanel Server

You are here:

PageSpeed (mod_pagespeed) is a module for Apache web server, designed to augment the speed of our websites on the server. PageSpeed module will accelerate your websites by applying filters to data in order to decrease the number of requests from browsers to our server. It also reduces the size of the data and for optimizing the requests, the data will be cached. The only disadvantage of PageSpeed module is that sometimes it utilizes more resources on servers. Let’s briefly discuss some of the benefits of PageSpeed modules:

1) Automated website and asset optimization

2) Latest web optimization techniques

3) Free, open-source, and regularly updated

4) Deployed by individual websites, hosting providers, CDNs

The PageSpeed module requires the mod_deflate module, you can check if this module installed on your server by running the following command

# apachectl -M | grep deflate

Let’s explore the steps on how to install PageSpeed module on a cPanel server.

1) Log in to your server via SSH as root user, and create a new yum repository on ‘/etc/yum.repos.d/’ folder by executing the following commands.

# vi /etc/yum.repos.d/mod-pagespeed.repo

Add the following lines there,

For 32 bit system:






For 64 bit system:






2) Install mod_pagespeed module by executing the following commands on the server.

# yum –enablerepo=mod-pagespeed install mod-pagespeed

Once the installation completes, the following files/directories will be present on the server.

/etc/cron.everyday/mod-pagespeed : This will regularly check for updates and install if they are available.

/etc/httpd/conf.d/pagespeed.conf : Basic configuration file

/usr/lib/httpd/modules/mod_pagespeed.so : mod_pagespeed module for Apache

/var/www/mod_pagespeed/cache : File caching directory for the websites

Please note that you would need to incorporate this module on Apache configuration to enable it server-wide.

3) To verify the mod_pagespeed module, create a php file on any of the domains and you will see the ‘X-Mod-Pagespeed’ section on the HTTP header.

4) To disable the mod_pagespeed, add the following line at the top of ‘/etc/httpd/conf.d/pagespeed.conf’ file.

ModPagespeed off

To enable it again, modify the above line as follows on pagespeed configuration file on the server.

ModPagespeed on

 If you require any further assistance, please contact our support department.

Post Your Comment