How to Install Magento Extension using composer

If you have purchased any Magento extension from Magento Marketplace, you can install that extension using the composer. Installing the extension using the composer is an easy process but looks complicated as it involves CLI.

Using CLI (Command Line Interface) you can perform a numerous operation; few of the important operations are as below which every Magento user needs.

  • Installing Magento and Extensions
  • Upgrading the Magento and Extensions to the latest versions.
  • Uninstalling any module or extension.
  • Clearing the cache.
  • Reindexing the indexers of Magento to keep data up-to-date.
  • Deploying Static Content view files.
  • Enable and Disable any modules
  • Compiling the code.
  • Change mode of Magento i.e. developer or production
  • Put the website on Maintenance mode.
  • And many more…

 Here we will discuss installing any extension using Composer using CLI in steps.

Note — You must have purchased the extension from Magento Marketplace  before proceeding further

Step 1 

Please make sure you have installed Magento 2, if not install it using CLI as explained in Install-cli or from Magento Setup Wizard by Downloading the Package.

Step 2 

Open SSH Shell Command Line and Enter Following Command, in the example; we are installing Purpletree Marketplace Extension. So if you want to install any other extension just put their vendor name in place of purpletree and module name in place of marketplace

1 how to

 It will ask for Authentication Credentials for your Magento Marketplace account. For that Login to your account and go to Access Key area — Access Keys/ and copy Public key and Private Key.

Step 3

Create a New Access key if not already there for Magento 2.

Step 4 

Enter Your Username as a public key and password as a private key. These are the credentials using which you must have purchased the extension.

ee

Step 5  

After Entering the Credentials your extension will be downloaded now you just have to install the extension by running Upgrade Command. And your Extension is ready to use.

php bin/magento setup:upgrade

So Using the Above steps you can easily install any Magento Extension which you have purchased from Magento Marketplace. Just make sure you have used the same credentials when you bought your extension and using it the same on the shell when validating it using the composer.

For the next steps how to configure Purpletree Marketplace extension or any other extension follow their respective documentation.


More details of Multivendor Marketplace for Magento 2 can be found here.