Loading..
Processing... Please wait...

Product was successfully added to your shopping cart.



The fastest way to get 90% PageSpeed score!

Would you like to improve speed of your Magento 2 or any other site? With no programming required?

PageSpeed Module is just the right tool for that. It is a server extension that modifies html and js/css/images on the fly and makes them optimized.

Here is a before/after report of Magento 2 default luma theme eCommerce site taken with the help of thinkwithgoogle.com :

Before / After PageSpeed Module Before / After PageSpeed Module

Disclaimer: to be able to benefit from PageSpeed module you need to have root privileges for your server. You need to be able to install new software on it. On the other hand some hosts have PageSpeed module preinstalled - you just have to enable it. Consult your hosting company for available options.

 

1. Installation

PageSpeed module installation is easy. If you have nginx server you can either build it from source or install a prebuilt package. Just google how to do that on your OS.

Apache users are in a better position. There are packages available for many distros.

 

2. Configuration

I will describe nginx Magento 2 configuration here.

Once pagespeed is installed just add these 4 lines to server directive:

server {
    listen 80;
    server_name hhvm.goivvy.com;
    set $MAGE_ROOT /mageroot;

#ADD THESE 4 lines
    pagespeed on;
    pagespeed FileCachePath /var/cache/pagespeed;
    pagespeed RewriteLevel CoreFilters;
    pagespeed EnableFilters defer_javascript,prioritize_critical_css,extend_cache;

    include /etc/nginx/nginx.magento214.inc;
}

Restart nginx. Pagespeed module should now modify html of your page automatically.

 

3. Tricks

The webserver might not deliver the optimized page the first time you load the page.

To allow pagespeed to instrument itself reload a page you are going to test 3 times according to this stackexchange answer.

I was able to get 99% score for my magento 2 store by just implementing those 4 lines above.

Please report to me any problems you are experiencing and I will try and guide you to the right direction.

 

 

If you find this post interesting do not hesitate to sign up for our newsletter and join the 845 people who receive Magento news, tips and tricks regularly.

Thank You!