Magento 2 AMP v3.x Installation

Here you will learn how to correctly install the Magento 2 AMP extension using two methods – Installation via the FTP or Composer.

Important Information:

  1. First of all, make sure your system meets all the requirements necessary for the correct functioning of our AMP extension for Magento 2. For more details on system requirements, please read Magento 2 system requirements.

You can choose one of the following two methods to install the extension on your Magento 2 store:

Extension Installation via Composer

Step 1. In order to install your Magento 2 AMP extension via the Composer, open the console (SSH terminal) and follow the commands:

1. In the terminal, switch to your Magento 2 root directory using the following command:

cd /FULL_PATH_TO_YOUR_MAGENTO2

where “FULL_PATH_TO_YOUR_MAGENTO2” is the path to your Magento 2 folder on your server.

2. After this, add the Plumrocket repository to your Composer configurations:

composer config repositories.plumrocket composer https://plumrocket.com/repo

3. Request the Plumrocket Extension to be added to your Magento 2 store:

composer require plumrocket/amp-theme-one plumrocket/module-pramp

After running this command, you will be required to enter the username and password, if you are installing the Plumrocket extension via Composer for the first time.

In order to find your personal Username and Password for the Composer installation, go to your account at https://plumrocket.com > select “My Account” in the header menu > select the “My Downloads” tab > find the required Plumrocket extension in the list > and press the “Install via Composer” link. Please see the screenshot below.

Step-by-Step action:

  1. Copy the “Username” key from the popup window.
  2. Copy the “Password” key from the popup window.

4. Copy the “ampiframe.php” file (provided with the module) to your Magento 2 webroot directory.

If you are serving files from the pub/ directory, then you must copy the “ampiframe.php” to pub/ folder:

cp /path/to/magento2/vendor/plumrocket/module-amp-catalog/ampiframe.php /path/to/magento2/pub

Otherwise, please copy the “ampiframe.php” to your Magento 2 default webroot:

cp /path/to/magento2/vendor/plumrocket/module-amp-catalog/ampiframe.php /path/to/magento2/

5. Run the next four Magento 2 commands:

php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

After running these commands, the extension should be installed successfully. A similar message should be displayed in your console as shown below:

Step 2: Check if the installation has been completed successfully, and set the serial key:

Important Information:

  1. Navigate to your Magento 2 Admin Panel and click on the “Plumrocket” tab.
  2. If there is the “AMP” tab in the list, it means that the extension has been successfully installed.
  3. Navigate to the “AMP” -> select the “Configuration” option.
  4. Your Serial Key field should be auto-filled with the green check mark displayed. This means that the Serial Key has been successfully activated and the extension can be enabled. However, if the green check mark is not there – you will need to enter your product Serial Key manually. Please follow the License Installation for Magento 2 instructions for more information.
magento 2 amp extension installation v3.png

Next Step > Magento 2 AMP Configuration

Extension Installation via FTP

Step 1. Download and unzip the Magento 2 AMP extension’s files as shown below:

Detailed description:

  1. Log into your account at https://plumrocket.com.
  2. Select “My Account” in the menu (to open this page, you have to log in first).
  3. Navigate to “My Downloads” in the menu.
  4. Press on the “Download” link to download the latest version of your Plumrocket Magento 2 extension.
  5. Unzip the Magento 2 AMP extension files and proceed to the next step.

Step 2. Upload files to the server using any FTP-client (To show you how it works, we used the FileZilla FTP-client.)

Detailed description:

  1. This is your client side. You will see the unpacked catalog containing the AMP Extension.
  2. This is your root directory on the server side. This is where the files should be uploaded.
  3. All the files have to be uploaded to the server. Select the files and press the right mouse button.
  4. Select the “Upload” option for these files.

Step 3. SSH Installation (requires SSH access to your webserver)

Note: In case you do not have SSH access, you can install the Plumrocket extension using the Web installation method.

1. In the terminal, switch to your Magento 2 root directory using the following command:

cd /FULL_PATH_TO_YOUR_MAGENTO2

where “FULL_PATH_TO_YOUR_MAGENTO2” is the path to your Magento 2 folder on your server.

2. You have to install the required composer package AMP Toolbox for PHP. Run the following command:

composer require ampproject/amp-toolbox ^0.11.2

3. Next, you have to install the required composer package Google reCAPTCHA to protect the AMP version of your website from spam and abuse. Run the following command:

composer require google/recaptcha ^1.2

4. You can install the following package for the built-in support of WebP:

composer require rosell-dk/webp-convert

5. Run the next four Magento 2 commands:

php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

After running these commands, the extension should be installed successfully. A similar message should be displayed in your console as displayed below:

Step 4: Check if the installation has been completed successfully, and set the serial key:

Important Information:

  1. Navigate to your Magento 2 Admin Panel and click on the Plumrocket tab.
  2. If there is the AMP tab in the list, it means that the extension has been successfully installed.
  3. Navigate to the AMP -> select Configuration option.
  4. Your Serial Key field should be auto-filled with the green check mark displayed. This means that the Serial Key has been successfully activated and the extension can be enabled. However, if the green check mark is not there – you will need to enter your product Serial Key manually. Please follow the License Installation for Magento 2 instructions for more information.
magento 2 amp extension installation v3.png

Next Step > Magento 2 AMP Configuration

Was this article helpful?