How to install mod_pagespeed on WHM?

'mod_pagespeed' is module of Apache which is nothing but plugin which is used for compressing the external code of JavaScript and CSS.  It also used to increase the page load time as it combines multiple external JavaScript file in one file so it reduces the http request. 

Steps to install the mod_pagespeed on EasyApache 4-

1. SSH to server with root access and fire below commands

$> yum install rpm-build cpio ea-apache24-mod_version
$> wget https://github.com/Prajithp/cpanel/raw/master/EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm
$> rpmbuild --rebuild ea-apache24-mod_pagespeed-1.9-32.11.src.rpm
$> rpm -ivh /root/rpmbuild/RPMS/x86_64/ea-apache24-mod_pagespeed-1.9-32.11.x86_64.rpm
 
2. After that restart Apache  service using below command -

$>/etc/init.d/httpd restart
 
3. Now you will need to clone the script in your cPanel server by below command -

/usr/local/cpanel/3rdparty/bin/git clone https://github.com/pagespeed/cpanel.git /tmp/pagespeed/

4. Now create Speed.pm.tar.gz -

$> cd /tmp/pagespeed/Easy
$> tar -zcvf Speed.pm.tar.gz pagespeed
$> mkdir -p /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy
$> mv Speed.pm Speed.pm.tar.gz -t /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/
$> cd && rm -rf /tmp/pagespeed

5. For verifying it you can login to WHM >> EasyApache >> Search for mod_pagespeed option. 

All done! Smile
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to install composer on cPanel server- Locally - inside the user's directory?

Composer is as tool which is used to manage the dependencies between the PHP softwares and...

Install PHP-SSH2 extension in cPanel

PHP SSH2 extension to be loaded into the cPanel server as this module is not available inside...

How to setup the root login alert notification email?

Its very important to keep a check on your servers and who logs into the server, From security...

How to enable Open SSL on WHM?

Before enabling open SSL, you can check whether it is already enabled on your server. Please fire...

Forbidden. You don’t have permission to access /wp-content/uploads/file-name.pptx

While uploading the files .pptx and .ppt files from WordPress admin dashboard, I was getting the...

Powered by WHMCompleteSolution