How to install Magento 2 extension

Avatar image of Maarten Maarten
November 7, 2022
You spend all day browsing for Magento 2 extensions, sifting through a dozen product pages until you locate what you're looking for. The extension, however, does not work after it has been installed. When you type "how to install Magento 2 extension" into Google, you get a lot of results.

You spend all day browsing for Magento 2 extensions, sifting through a dozen product pages until you locate what you’re looking for. The extension, however, does not work after it has been installed. When you type “how to install Magento 2 extension” into Google, you get a lot of result

You’ve come to the right spot since we’ve provided you with clear instructions, as well as particular examples of Magento 2 Extensions by BSS Commerce, Marketplace extension, and free Github module.

Let’s get this party started.

MORE B2B OPEN SOURCE SOLUTIONS:

Magento 2 B2B plugin to improve wholesale business from Login to Checkout.

I. Set up the Magento 2 Extension

1. Where Can I Get Magento 2 Extensions From?

If you buy or download Magento 2 extensions, such as BSSCommerce, you will have to manually install them from zip files.

Please follow the six steps outlined below:

The first step is to unzip the file.

Step 2: Make a new directory called app/code/Bss/MODULENAME/, where MODULENAME is the internal identifier of the module. Look for the node “psr-4” in the “composer.json” file in the extension ZIP file you downloaded. For instance, it may say “BssAjaxCart” or “BssOneStepCheckout” there, and the MODULENAME is the section after and before that, so in our instances AjaxCart” or “OneStepCheckout.” This is the name of the directory, for example, app/code/Bss/AjaxCart, and it’s where you place the contents of the extension ZIP file.

Step 3: Put the app/code/Bss/MODULENAME/ directory in the root of your Magento installation. All directories should be organized in the same way as the existing directory structure.

Step 4: Navigate to the root directory of Magento 2. php bin/magento setup:upgrade is the command to use.

Step 5: Type php bin/magento setup:static-content:deploy into the command prompt.

Step 6: Delete all cache files.

2. How to Install Magento 2 Marketplace Extensions

Magento 2 extensions purchased from the Marketplace can be installed in one of three ways:

# Manually Install Magento 2 Module From Zip File

Please follow the six-step installation procedure outlined above.

# Using Composer, install Magento 2 extension

*Note:

It is necessary to first install the composer.

To install, you’ll need your access key. In the Marketplace, go to My Profile, then to My Products, then to Access Keys.

magento-2-install-extension-access-keys-market-place

To install Magento 2 extensions, you’ll need a public key and a private key.

magento-install-extension-get-access-keys

Let’s walk through the procedures to install Magento 2 extension via composer in the following order:

install-magento-2-module

Step 1: In My Purchase, find the extension you want to install and click Technical Details.

Step 2: Open the composer.json file in your Magento project directory and make the necessary changes.

require component-name>:version> in composer

For instance, composer needs bsscommerce/push-notification:1.0.0.

Step 3: Execute the following command: php bin/magento setup:upgrade

Step 4: Type php bin/magento setup:static-content:deploy into the command prompt.

Step 5: Delete all cache files.

# Admin Web Setup Wizard to Install Magento Extension

Step 1: Go to System Web Setup Wizard Component Manager in the Magento 2 Admin Panel.

magento-2-install-extension-wizard

Step 2: Select Review and Install from the drop-down menu.

Step 3: Next, choose the Magento 2 extension you wish to install in the list of available components and click “Install.”

magento-2-install-extension-manager

Step 4: Begin the Readiness Assessment.

If you see an error like the one in the screenshot below, first try setting up a Magento 2 cron job and resolving other difficulties.

magento-2-install-extesion-check

If you don’t get any issues while executing the previous step, simply click ‘Next.’

Step 5: If required, make a backup, and then proceed.

Step 6: Finally, press the ‘Enable’ button.

magento-2-how-to-install-extension-enable

3. How to Install a Github Magento 2 Module

For those unfamiliar with Github, it is a prominent web-based Git version control system where you may discover a well-coded Magento extension module to download and install.

There are two ways to install Magento 2 modules from Github:

# Manually Install Magento 2 Extension From Zip File

Please follow the 6-step installation procedure outlined in the Magento 2 extension installation guide.

# Using Composer, install Magento 2 extension

*Remember to install Composer ahead of time once more.

As an example, we’ll look at the BSS Commerce module on Github.

Step 1: In the extension’s composer.json file, look for the extension you wish to install, as well as its name and version.

magento-2-install-module-via-composer

Step 2: Open the composer.json file in your Magento project directory and make the necessary changes.

require component-name>:version> in composer

bsscommerce/push-notification:1.0.0 is an example of a composer need.

Step 3: Type php bin/magento setup:upgrade into the command prompt.

Step 4: Type php bin/magento setup:static-content:deploy into the command prompt.

Step 5: Delete all cache files.

II. Turn off the Magento 2 extension

Aside from “How to install Magento 2 extension,” merchants are also looking for a way to turn off Magento 2 extension due to a brief conflict or issue. Three options are presented below.

Setup Wizard for the Web

Navigate to System Web Setup Wizard Component Manager Enabled / Disabled in the Magento 2 Admin Panel.

disable-extension-wizard

Line of Command

Step 1: Go to the directory where your Magento project is stored. Run this command to turn off any installed modules.

module:disable VendorName ModuleName in php bin/magento

For example, disable Bss PreOrder in php bin/magento module.

Step 2: Type php bin/magento setup:upgrade into the command prompt.

Step 3: Type php bin/magento setup:upgrade into the command prompt.

Step 4: Type php bin/magento setup:static-content:deploy into the command prompt.

Step 5: Delete all cache files.

Extension for Configuration

The enable/disable feature is often included in the module’s configuration by extension providers.

For example, go to Store => Configuration, search for the vendor, choose the extension, enable or disable it, and clear the cache.

disable-extension

*Note: The module is still active, but the functions are reset to their default values.

Industry news straight to your inbox

Get the latest commerce news, trends, and strategies to grow your business
Subscribe to the newsletter
By submitting this form, you agree to receive promotional messages from Magstack. Unsubscribe any time by clicking the link in our emails.
Select location and language

Contact Our Sales Team

Learn more about our products, features, and pricing options.
By submitting this form, you agree to receive promotional messages from Shopify about its products and services. You can unsubscribe at any time by clicking on the link at the bottom of our emails.
Product
Pricing
Use cases
Recourses
Documentation
Log in
Start a free trial