Install Mod_Pagespeed to Speed Up Apache and Nginx Performance Upto 10x

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

74 Responses

  1. Khushal Bisht says:

    Ngx_Pagespeed and Mod_PageSpeed both are same or different? can i configure both module in one nginx webserver? what is the differences between Ngx_Pagespeed and Mod_PageSpeed? can any one explain me?

  2. Sandeep says:

    Hi Ravi, Good article but I have complied apache2.4 and installed at production. In above doc, you only mentioned installation for rpm. How can Mod_Pagespeed be integrated with complied apache? Can you help to understand?

  3. Tim Hosking says:

    Nginx doesn’t load modules dynamically, they must be compiled in. I can’t believe you have tested this method on nginx.

  4. Dougg Leigh says:

    I am trying to install pagespeed on the server for my domain. Apparently, after speaking with the tech people at Telus WebHosting (Apache server), I can install it in the .htaccess file in the “public” folder.

    I have downloaded the .deb file for pagespeed, but I have NO IDEA how to actually get it installed in the .htaccess file. Can someone tell me, step by step, how I go about getting it installed on the server.

    Thank you.

    • Ravi Saive says:


      You can install .deb pagespeed package using the following command.

      $ sudo dpkg -i packname.deb
      • Doug says:

        Thank you Ravi.

        Now, my question is this, when I go to my .htaccess file on the remote server, and type in $ sudo dpkg -i mod-pagespeed-stable_current_amd64.deb, is that all I have to do?? Or, is there something else that is needed in order for pagespeed to be installed and work on the server?

        Do I actually have to have the 6.9MB .deb file on the server as well??

        Your comments are much appreciated.


        • Ravi Saive says:


          Yes, you just need to install the mod_pagespeed .deb package on the Linux machine, thats it.

          • Doug says:

            Thanks again Ravi.

            What I am trying to get at is this: HOW do I install pagespeed on the remote server?? My websites are located on Telus. Do I simply paste the information below into my (public directory) .htaccess file?

            $ wget
            $ sudo dpkg -i mod-pagespeed-stable_current_amd64.deb
            $ sudo apt-get -f install

            Will this install pagespeed on the Linux server?? I have tried to copy and paste the above information into my .htaccess file, but when I try to open my website in a browser I get a 500 error. Without that information, my websites open up fine.

            What I really need is some ‘detailed’ information on how to get pagespeed installed correctly on the LInux server.
            Thank you for you assistance.

          • Ravi Saive says:


            Firstly, .htaccess is a configuration file for managing rewrite rules, this file not used to install software on Linux. To install mod_pagespeed you must have a SSH access to a remote server and execute these commands in the terminal.

  5. Yazir Arafath says:

    Error : httpd >= 2.2 is needed by mod-pagespeed-stable-

    Why would I install Apache when my website is running on Nginx???

  6. @Ravi I am a little confused, why people start talking about this old server plugin again. It’s optimizing a little bit. See we optimized all those pagespeed rules set by Google in our self developed cms. We couldn’t optimize to 100/100 without using a lot of node.js solutions, image compression services, hosting of analytics, maps and youtube js files.

    Do people think it requires just mod_pagespeed to solve all issues? they must be dreaming LOL

    • Ravi Saive says:


      This plugin is not at all old and in fact Google suggesting this tool to check and optimize sites according suggestions given by this tool.. This tool is just an example, there are other well known plugins like WP-Cache, WP-Super-Cache, WP-Rocket, etc.. you can use any of them to optimize sites..

  7. André Böker says:

    we have it already. But I need to know how it effects the unoptimized pagespeed score.

    this is our tripple 100 result

    • Ravi Saive says:


      What do you mean by unoptimized pagespeed score? could you explain me more? what you exactly looking for? without mod_pagespeed module, site loading will take time as the content (html,css,js.png,jpg etc.) not optimized and will take time to load, but with mod_pagespeed installed, you can call your all content in an optimized form thus increase in speed..

Leave a Reply to Tim Hosking Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.