Magento Full Page Cache InstallationFull Page Cache

« Back to Magento Full Page Cache

You can install the module using Composer or you can manually install it using FTP.

  • Run the following commands in your Magento root directory to install the module using Composer.

    # Add the FishPig Composer repo
    composer config repositories.fishpig composer https://repo.fishpig.co.uk/
        
    # Install the module using Composer
    composer require fishpig/magento2-bolt
    
    # Enable the module in Magento 2
    php bin/magento module:enable FishPig_Bolt
    
    # Run the Magento upgrade system
    php bin/magento setup:upgrade
  • You can download the latest version of the module from the Downloads page.

    Extract the ZIP file and upload the files to your Magento site at the directory below:

    app/code/FishPig/Bolt

    When creating the folders, ensure you use the correct capitalisation.

    To complete the installation, run the following commands in a terminal.

    # Enable the module in Magento 2
    php bin/magento module:enable FishPig_Bolt
    
    # Run the Magento upgrade system
    php bin/magento setup:upgrade

Configuration

With the extension installed, we need to make a small modification to Magento's index.php. Open index.php (this will be in your Magento root or the pub directory) using FTP and find the following line:

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

Right above this line, you need to add a single line. Below is what it should look like after you make the adjustment.

\FishPig\Bolt\App::create(BP, isset($params) ? $params : $_SERVER);

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

This will enable Bolt for your Magento frontend. You can also enable debugging if you are having any issues. To do this, make the following adjustments:

$params[\FishPig\Bolt\App::DEBUG_FLAG] = true;

\FishPig\Bolt\App::create(BP, $params);

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

Multistore

Bolt fully supports Magento multistore and you do not have to make any configuration changes for Bolt to run in a multi-store environment.

Storage Types

Bolt supports the standard files cache and session types, as well as Redis. Memcache adapters are in development so please get in touch if you wish to use Memcache.

Hole Punch

The Hole Punch feature in Bolt comes ready configured for 95% of Magento installations, however you can add your own blocks to the hole punch via the configuration.

Troubleshooting

To check that Bolt is running and has cached the current page, use your browsers developer tools to check the headers of the HTTP Response. When Bolt has cached a page, the X-Cached-By: Bolt header will be set. If this header is not set then the current page has not been retrieved from the cache.