Install Extension

How Can I Download and Install the Magento 2 Extension?

1. Download the Afterpay Extension

Download the Afterpay extension from the GitHub repository and unzip it.

2a. Install Extension

There are 2 ways to install the extension. If you use Composer see 2b.

📘

Install Directory

Magento 2 can be installed in any directory on your server. For the purposes of this document, [MAGENTO] refers to the root directory where Magento 2 is installed.

  • Create directory Afterpay/Afterpay' in [MAGENTO]/app/code
  • Copy the files to the 'Afterpay/Afterpay' folder
  • Open the Command Line Interface (CLI) and run the commands below:

Command

Description

php bin/magento module:enable Afterpay_Afterpay

Enable Afterpay extension

php bin/magento setup:upgrade

Magento setup upgrade

php bin/magento setup:di:compile

Magento dependencies injection complile

php bin/magento setup:static-content:deploy

Magento static content deployment

2b. Install Extension using Composer

  • Open Command Line Interface and navigate to the Magento directory on your server
  • In CLI, run the below command to install Afterpay module:
    composer require afterpay-global/module-afterpay
  • At the Composer request, enter your Magento marketplace credentials (public key - username, private key - password)
  • Make sure that Composer finished the installation without errors
  • In CLI, run the Magento setup upgrade:
    php bin/magento setup:upgrade
  • In CLI, run the Magento Dependencies Injection Compile:
    php bin/magento setup:di:compile
  • In CLI, run the Magento Static Content deployment:
    php bin/magento setup:static-content:deploy

3. Flush the Magento System Cache

Login to Magento Admin and go to System → Cache Management. Then select Flush Cache Storage


Did this page help you?