Skip to content

Magento 2

Peakhour's Magento 2 plugin integrates with Magento 2's comprehensive built in caching. Once installed you can choose Peakhour.io as a backend in the full page cache settings, we fully support Magento's custom cache tags, and vary on cookie value (X-Magento-Vary)and will automatically flush our global CDN when you make changes within Magento.

Supported Features#

  • Choose Peakhour.io as a backend within Magento's built in full page cache settings.
  • Fully supports flush by cache tags
  • Fully supports cache vary on cookie value (X-Magento-Vary)
  • Manually flush by URL if required.

Requirements#

  • Magento 2.1x or greater
  • PHP 5.6 or greater

Download#

Click here to download the latest version (v1.0.0) of the plugin.

Installation#

Prerequisites#

Before installing make a backup of your Magento site as a precaution. If you have a development environment it is recommended that you install the plugin there first to test and confirm functionality.

You will need a Peakhour account to be able to utilise this extension. If you don't already have one you can sign up here, installation of the extension does not automatically create an account for you. Pricing is based on page views and all new signups get a free trial. Once you have your account the only other change you need to make to activate our acceleration and web application firewall is a DNS change. Do not enable the plugin until you have successfully configured your domain behind the Peakhour service.

Install via Magento marketplace#

Marketplace installation is only available for Magento 2.2.x and greater, see the official magento doc page

Install via Composer#

This will be done via command line on your Magento server. You will have to make sure you have composer installed.

php composer.phar require peakhour/magento2
php bin/magento module:enable Peakhour_Cdn
php bin/magento setup:upgrade
php bin/magento cache:clean

Then you can log in to the Magento admin and finish configuration.

Install via zip file#

  1. Visit our github page
  2. Click on the 'clone or download' button and choose 'Download zip'
  3. Upload the zip file to your Magento server.
  4. Log onto the Magento server as the Magento user (if not possible to log in as the Magento User you will need to do some extra steps)
  5. Change directory to the Magento home and create the directory app/code/Peakhour/Cdn
  6. Change directory to the newly created directory from step 5.
  7. Unzip the zip file
  8. Change directory back to the Magento Home
  9. Verify with

    php bin/magento module:status

    and make sure Peakhour is listed

  10. Enable module with

    php bin/magento module:enable Peakhour_Cdn

  11. Then run

    php bin/magento setup:upgrade

  12. Then clear caches with

    php bin/magento cache:clean

Configuration#

  1. Log in to your Magento admin
  2. Navigate to Stores -> Configuration, then Advanced -> System, then Full Page Cache
  3. Untick Use System Value
  4. Select Peakhour.io from the dropdown for Caching Application
  5. Expand the Peakhour.io Settings section
  6. Enter your Peakhour API Key:
    1. Log in to your Peakhour account
    2. Click on API Keys in the left menu.
    3. If you don't have a key for your domain then enter your domain name and click Create
    4. Copy the generated key and paste into the API Key field in the Peakhour.io settings section
  7. Enter your domain name and save config
  8. Click 'Test Connection', you will hopefully see 'Success!'