How to Install Magento 2 extensions

What is Extension?

An extension is a software that can be added to a Magento website. It includes PHP code, functions etc. and this code is installed in a Magento store.

Magento developers develop an extension to extend the default functionality, implement new functionality, solve a problem, or integrate third-party software.

Magento extensions can be used in various areas of e-commerce such as:

  • Accounting and finance
  • Administration
  • Checkout enhancements
  • Payments
  • Security & Performance
  • Shipping etc…

Improving the different sections of the E-commerce store with the help of the Magento extensions, contribute to a fully functional shopping platform.

Installation Procedure of Extensions?

By installing Magento extensions, implement the required features based on your business.

However, installing Magento module is simple. You need to follow the below steps to install an extension in Magento store.

Magento give you an functionality to manually install extensions using three different methods: via

1.) composer

2.) ZIP-archive

3.) browser

The choice of a method depends on the way that a module appeared in the system. Let’s consider each of the in detail.

Install The Extension Using Composer

Step – 1: First of all you will generating “Access Keys” in your magento account.

How To Generate “Access Keys” ?

Log in or create a new account at magento.com. After that click on the “Marketplace” link in your account.

Or go directly to the Magento extensions store. and either log in or create account.

In “My Profile” you are looking for the “My Products / Access Keys” section. Click on “Access Keys” and you just need to generate the necessary keys.

Step – 2: Now open the terminal and goto your magento root directory.

For example:

cd C:\xampp\htdocs\magento

Step – 3: Run this below command.

composer require :

When you run this command for the first time, CLI will ask you to enter the Username and Password. Please fill in the access key created in Step 1. 

Note: The Public key corresponds to the Username, and the Private key corresponds to the Password.

Composer will inform a message to you. If you want to save the Access key, please type Y.

In case you already saved the Access key in the server, but you want to use another Access key, do the following:

Open the file ~/.composer/auth.json and delete the username/password of the corresponding repository:

Note: The composer is a file called composer.phar. You can download it at getcomposer.org. It is launched from the Magento root directory. The folder should contain the composer.json file with the configuration of the installed libraries.

php composer.phar

If the composer is installed globally on the server, there is no need to download it.

Step – 4: After you have to run below commands.

$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy -f

And now flush and clear the cache using below commands.

$ php bin/magento cache:flush
$ php bin/magento cache:clear

Install The Extension Using ZIP-Archive

Step – 1: First step is to unzip the ZIP file or Archive file.

Step – 2: Then, create a directory app/code/COMPANYNAME/MODULENAME into the root directory of your Magento installation where COMPANYNAME and MODULENAME should be replaced by the module internal identifier. You can easily find it from the composer.json file in the extension ZIP file you downloaded.

Step – 3: After creating the module directory, put the contents of the extension file in there.

Step – 4: Now open the terminal and goto your magento root directory.

For example:

cd C:\xampp\htdocs\magento

Step – 5: After you have to run below commands.

$ php bin/magento setup:upgrade
$ php bin/magento setup:static-content:deploy -f

And now flush and clear the cache using below commands.

$ php bin/magento cache:flush
$ php bin/magento cache:clear

Install The Extension Using a Browser

Step – 1: First, Go to Magento admin panel, After navigate to System ==> Web Setup Wizard ==> Extension Manager.

Step – 2: Here we see that the extension manager lists each component that is installed and also used to synchronize any extensions you have purchased. Now click ‘Review and Install’, as shown in image below.

Step – 3: As the next step, you will get a list of modules that are ready to install. Find the module that you want to install and click ‘Install’.

Step – 4: Next, start readiness check.

Step – 5: If you face any readiness check error, check your Magento 2 system requirements and make changes as required.

Step – 6: Once the errors are resolved, you will get a readiness check complete message, then, click ‘Next’.

Step – 7: Now, you will get a message to take a backup before installing an extension.

Step – 8:  Click ‘Next’ when the backup is done.
Step – 9: Now you will see the installation status.

Follow this above steps and your Magento extension is installed.

Leave A Comment