Getting Started

Welcome to the Google PageSpeed Optimizer Documentation. Whether you are a new or an advanced user, you can find some useful information here.

First of all, we recommend you check the following link:

How to install the extension

  1. Backup your store's database and web directory.
  2. Login to your server's SSH console and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products into the SSH console and press ENTER.
  4. Run the command below to enable the extension:
        php -f bin/magento module:enable Mirasvit_Core Mirasvit_Optimize Mirasvit_ImageLazyLoad Mirasvit_OptimizeCss Mirasvit_OptimizeHtml Mirasvit_OptimizeInsight Mirasvit_OptimizeJs Mirasvit_OptimizeImage
  5. Run the command below to install the extension:
        php -f bin/magento setup:upgrade
  6. Run the command below to clean the cache:
        php -f bin/magento cache:clean
  7. Deploy static view files:

        rm -rf pub/static/frontend/*; rm -rf pub/static/backend/*; rm -rf var/view_preprocessed/*;
        php -f bin/magento setup:static-content:deploy
  8. Make sure that the native Magento cronjob is configured and working correctly. The extension performs all tasks in cron.

Google PageSpeed Optimizer settings

The settings of the Google PageSpeed Optimizer is grouped into the following sections:

Insight

This configuration section was designed for checking the page speed rate of your website for desktop and mobile versions.
The Run GoogleSpeed Test is used to run a quick speed test for your website's home page.

  • Configurations
    • URLs for monitoring - specify your website's URLs that need to be monitored when determining page speed performance, placing each URL in a new line.

JavaScript Optimization

  • Enable JavaScript optimization - enable/disable JavaScript optimization for your website.
    Run bin/magento setup:static-content:deploy after saving the configurations.
  • Merge JavaScript files - enable/disable merge JS files. This config depends on the default Magento "Merge JavaScript files" config that available only in developer mode (Stores - Configuration - Advanced - Developer - JavaScript Settings).
    If enabled, the extension will merge JavaScript files into one file to reduce the number of HTTP requests made by a browser during the page loading process.
    JavaScript bundling will not work when this option is enabled.
  • Minify JavaScript - enable/disable minification JS files. This config depends on the default Magento "Minify JavaScript files" config that available only in developer mode (Stores - Configuration - Advanced - Developer - JavaScript Settings).
    If enabled, the extension combines JavaScript files into bundles when required for particular page types, excluding unnecessary bundle files from the page depending on the page type.
    Run bin/magento setup:static-content:deploy after saving the configurations.
  • Move JavaScript To Page Bottom - enable/disable moving JS files to the bottom of the page. How it works: Before the HTML page sent to the browser, our module checks for all external JS resources (