How to Install/Uninstall Magento Extensions (Detailed Examples)

You spend all day looking for Magento 2 extensions, dip down into a dozen product pages and finally find your need. After being installed, however, the extension doesn’t work at all. You turn into Google doing the search “how to install Magento 2 extension”.

When you end your eyes here, you do the right cause we provide you with detailed instruction, along with the specific example of Magento 2 Extensions by BSS Commerce, Marketplace extension, and free module on Github.

Let’s get started.

MORE SOLUTIONS FOR B2B OPEN SOURCE: B2B extension Magento 2 to improve wholesale business from Login to Checkout. 

I. Install Magento Extension

1. How to install Magento extension from stores

In case you purchase or download extensions: for example, BSSCommerce, you will have to install Magento 2 extensions manually from zip files.

Please follow 6 steps as below:

  • Step 1: Unzip the file
  • Step 2: Create another directory called app/code/Bss/MODULENAME/ where MODULENAME must be replaced by the modules internal identifier. You can find it in the “composer.json” file in the extension ZIP file you downloaded, look at the node “psr-4”. For example, it could say “Bss\\AjaxCart\\” or “Bss\\OneStepCheckout\\” there, then the MODULENAME is the part after \\ and before \\, so in our examples AjaxCart” or “OneStepCheckout”. This is what you call the directory, then, for example, app/code/Bss/AjaxCart, and you put the contents of the extension ZIP file in there.
  • Step 3: Upload the directory app/code/Bss/MODULENAME/ into the root directory of your Magento installation. All directories should match the existing directory structure
  • Step 4: Go to Magento 2 root directory. Run: php bin/magento setup:upgrade.
  • Step 5: Run: php bin/magento setup:static-content:deploy.
  • Step 6: Clear all Cache.

2. How to install Magento 2 extension from Marketplace

There are 3 ways to Magento 2 install extension from marketplace:

# Install Magento 2 module manually from the zip file

The first way to Magento 2 install extension from marketplace is via a zip file. Please follow the 6-step installation as above.

# Install Magento 2 extension via Composer

*Note:

  • It is required to install the composer first.
  • You must have your access key to install. Navigate to My Profile in Marketplace, then choose Access Keys in My Products section.
magento-2-install-extension-access-keys-market-place

Then, you will get a public key and private key to install Magento 2 extensions.

magento-install-extension-get-access-keys

Now, let’s navigate through the following 5 steps to install Magento 2 extension via composer:

install-magento-2-module
  • Step 1: Find the extension you want to install and click Technical Details in My Purchase.
  • Step 2: Navigate to your Magento project directory and update your composer.json file.

composer require <component-name>:<version>EX: composer require bsscommerce/push-notification:1.0.0

  • Step 3: Run: php bin/magento setup:upgrade
  • Step 4: Run: php bin/magento setup:static-content:deploy.
  • Step 5: Clear all Cache.

# How to install extensions in Magento 2 via admin web setup wizard

  • First, Step 1: In the Magento 2 Admin Panel, navigate to System ⇒ Web Setup Wizard ⇒  Component Manager.
magento-2-install-extension-wizard
  • Step 2: Go to Review and Install.
  • Step 3: Then, in the list of components available, find the Magento 2 extension you want to install, and press “Install.”
magento-2-install-extension-manager
  • Step 4: Start the Readiness Check.

If you see an error like that in the screenshot below, try to set up a Magento 2 cron job and resolve other issues first before proceeding.

magento-2-install-extesion-check

If you don’t encounter any errors when performing the step above, just hit ‘Next.’

  • Step 5: Create a Backup if necessary and then next.
  • Step 6: Finally, just hit ‘Enable’.
magento-2-how-to-install-extension-enable

3. How To Install Extensions in Magento 2 from Github

For those who do not know Github, this is one popular web-based Git version control system where you can find a well-code module available to download and install Magento extensions.

You can install Magento 2 module from Github in two ways:

# Install Magento 2 extension manually from the zip file

Please follow the 6-step installation as in how to install Magento 2 extension from stores.

# Install Magento 2 extension via Composer

*Note: One more time, remember to install Composer in advance.

Here we take BSS Commerce module on Github as an example.

  • Step 1: Find the extension you want to install as well as its name and version in file composer.json of the extension.
magento-2-install-module-via-composer
  • Step 2: Navigate to your Magento project directory and update your composer.json file.

composer require <component-name>:<version>

Example: composer require bsscommerce/push-notification:1.0.0

  • Step 3: Run: php bin/magento setup:upgrade.
  • Next, Step 4: Run: php bin/magento setup:static-content:deploy.
  • Step 5: Clear all Cache.

II. Disable Magento 2 Extension

Besides “How to install Magento extension”, merchants also search for ways to disable Magento 2 extension because of the temporary conflict or error. Here we present 3 solutions.

Web setup wizard

In the Magento 2 Admin Panel, navigate to System ⇒ Web Setup Wizard ⇒ Component Manager ⇒ Enabled / Disabled.

disable-extension-wizard

Command line

  • Step 1: Navigate to your Magento project directory. To disable any installed module, run

php bin/magento module:disable VendorName_ModuleName

EX: php bin/magento module:disable Bss_PreOrder

  • Then, Step 2: Run: php bin/magento setup:upgrade.
  • Step 3: Run: php bin/magento setup:upgrade.
  • Step 4: Run: php bin/magento setup:static-content:deploy.
  • Step 5: Clear all Cache.

Configuration Extension

Many extension providers include the enable/disable functionality in the module’s configuration.

 

Example: Navigate to Store => Configuration, find the vendor, select the extension, Enable / Disable it, and refresh the cache.

disable-extension

*Note: The module remains active, but functions return to the initial value.

III. Uninstall Magento Extension

Not only provide you various solutions to install Magento 2 extension but we also guide you to uninstall Magento 2 extension. Feel free to select among the following 3 ways:

1. Uninstall Magento 2 module via Web setup wizard

In the Magento 2 Admin Panel, navigate to System ⇒ Web Setup Wizard ⇒ Extension Manager ⇒ Update / Uninstall.

magento-uninstall-module-wizard

2. Uninstall Magento 2 extension via Command line

  • Step 1: Navigate to your Magento project directory. To uninstall Magento 2 module, run:

php bin/magento module:uninstall [–backup-code] [–backup-media] [–backup-db] [-r|–remove-data] VendorName_ModuleName

magento-2-uninstall-module-command-line
  • Step 2: If –remove-data is specified, removes the database schema and data defined in the module’s Uninstall classes.

EX: php bin/magento module:uninstall Bss_PreOrder

  • Step 3: Run: php bin/magento setup:upgrade.
  • Next, Step 4: Run: php bin/magento setup:static-content:deploy.
  • Step 5: Clear all Cache.

*Note: If you attempt to uninstall Magento 2 module with a dependency on another module, you must uninstall both.

Most BSS Commerce’s modules do not have an Uninstall file.

3. Uninstall Magento 2 module via Composer

  • Step 1: Navigate to your Magento project directory. To uninstall Magento 2 extension, you can run:

php bin/magento module:disable VendorName_ModuleName

EX: php bin/magento module:disable Bss_PreOrder

  • Step 2: Remove extension files:

composer remove [-r|–remove-data] <component-name>

The –remove-data option removes database data and schema defined by the module’s Uninstall class.

For each specified module to uninstall, invoke the uninstall method in its Uninstall class. This class must inherit from Magento\Framework\Setup\UninstallInterface.

*Note: you can find the exact match for <component-name> in composer.json file associated with the extension.

  • Step 3: Run: php bin/magento setup:upgrade.
  • Step 4: Run: php bin/magento setup:static-content:deploy.
  • Step 5: Clear all Cache.

IV. Manual Installation Vs. Web Setup Wizard Vs. Command Line – Which to Choose?

 

Manual

Composer

Web Setup Wizard

Advantage   – Easy to update module version

 

– Install without needing folder code

– Don’t need ssh.

– Suitable with the non-technical

– Easy to update module version

– Install without needing folder code

Disadvantage – Require folder code – Must install composer

– Must handle errors when check index has errors

Free Installation Service?

Why do you have to deal with complex Magento 2 extensions installation?

 

Unlike many Magento 2 extension providers, who offer installation service at an extra cost, BSS Commerce is willing to replace you to implement this task. Whenever you install any Magento 2 extension available on our website, our certified developers will support from scratch and make sure the extension work on your store.

magento-2-extensions

Free installation is offered for Magento 2 extensions of all categories, including B2B Extensions, Administration, SEO Extensions, Sales Motivation, etc. At BSS Commerce, you can also experience further friendly support policies:

  • Free one-year support
  • Free lifetime updates
  • 30-day money back

Final Thought

Above is the detailed instruction to install Magento extension, along with various ways to disable or uninstall Magento modules. Feel free to refer to and if you have any questions, leave them below, and we will try our best to blow your pain away. 

BSS Commerce is one of the leading Magento extension providers and web development services in the world. With experienced and certified Magento developers, we commit to bring high-quality products and services to optimize our business effectively.

CONTACT NOW to let us know your problems. We are willing to support you every time.

eCommerce Marketer at | Posts

I'm Greene from BSS Commerce. I love researching and sharing you with useful information about Magento, Ecommerce, and Marketing, etc. Hope you enjoy!

Write A Comment

Name