Google PageSpeed Optimize
v2.0.14

Google PageSpeed Optimizer settings for Magento Cloud

Since Magento Cloud projects have writing restrictions, to configure the extension in regards to the static content, the extension settings should be placed inside the [root_store_path]/app/etc/config.php file.

The config, most typical for the majority of Magento stores should look like this:

'system' => [
    'default' => [
        'dev' => [
            'template' => [
                'minify_html' => 1   // minify HTML
            ],
            'js' => [
                'merge_files' => 0,  // merge JS files
                'minify_files' => 1, // minify JS files
            ],
            'css' => [
                'merge_css_files' => 1, // merge CSS files
                'minify_files' => 1,    // minify CSS files
            ]
        ]
    ],
    'mst_optimize' => [
        'optimize_js' => [
            'enabled' => 1,   // enable JS optimizations, also enables advanced JS bundling. If you'd like to disable this feature it is recommended to disable all JS optimizations along with disabling this setting
            'minify_js' => 1, // minify JS files
            'merge_js' => 0   // merge JS files
        ],
        'optimize_css' => [
            'merge_css' => 1,  // merge CSS files
            'minify_css' => 1  // minify CSS files
        ],
        'optimize_html' => [
            'minify_html' => 1 // minify HTML 
        ]
    ],
]

Where the default/dev part of the system config array is the default Magento settings and the mst_optimize part is our extension settings.

This config should be placed inside the first-level array in the [root_store_path]/app/etc/config.php file.

As our extension extends from some of Magento's default functionality, the default settings and settings of our extension should be changed accordingly.
For example, default/dev/template/minify_html should be changed together with mst_optimize/optimize_html/minify_html.

In the above config, comments are added to explain which configs are related and should be changed correspondingly.
Remove these comments before adding the config to the [root_store_path]/app/etc/config.php file.

Note

If the file [root_store_path]/app/etc/config.php already contains some of these settings, then these settings should be changed according to what optimization settings should be enabled/disabled in the store.
Settings should be changed in both the default/dev and the mst_optimize section of the configuration array.

All other extension settings can be safely changed from the admin panel of the store.