How to Install Magento 2 Extensions

How to Install Magento 2 Extensions

Magento 2 is the widely used open-source e-commerce platform employed to create and automatically update online Magento stores around the world. (In 2018, Adobe acquired Magento and now markets the technology as part of Adobe Commerce).

While Magneto comes with great functionality, it requires extensions to tailor itself to the requirements of individual e-commerce operations. Its process takes care of the entire retail transaction right through to checkout. More dynamic and full-featured than Magento 1, Magento 2 supports three kinds of third-party extensions:

  • Modules. Extending capabilities and customizing functionality
  • Themes. Changing the look and feel of the pages your customers see
  • Language packages. Helping prepare your e-commerce site for a particular language.

Here’s what you need to know about how to install Magento 2 extensions.

How long does it take to install Magento 2 extensions?

You can install Magento 2 in 10 minutes, but the complete process, which includes reconfiguring your web server and installing extensions, often takes up to two hours.

If you have experience installing and uninstalling Magento 2 extensions, the process can take only a few minutes. But if you have less experience or as a contingency in case problems crop up, allow a few hours or even days to iron out the issues. Some extension specialists budget one or two business days for the installation process. A variety of Magento courses and tutorials are also available to get the most from the e-commerce platform and its extensions.

This more extensive installation process is why some businesses will turn to experienced Magento 2 developers on Upwork to help build stores and install the correct extensions—so they can have a seamless e-commerce store-building experience.

How to install Magento 2 extensions

One of the most common ways to install Magento 2 extensions is using Composer, a dependency manager for PHP. Working with both Adobe Commerce and Magento Open Source software, Composer has advantages like:

  • The ability to reuse third-party libraries without including source code
  • A component-based architecture with strong dependency management to minimize extension conflicts
  • Sticking to PHP-Framework Interoperability Group (FIG) standards

Before adding an extension, incorporate the best practice of backing up your database. Follow the steps below to install Magento 2 extensions using Composer.

1. Connect to your Magento 2 server using SSH protocol

Log into the secure shell (SSH) console of your server.

In Windows, you can connect to Magento 2 servers using Putty, WinSCP, or Git Preview. Type in your username and password after logging in. In this example, we are using the Putty server.

--CODE language-markup--
Using username “John”.
john@192.134.1.300’s password:
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.15.0-46-generic x86_64)

 *  Documentation:   https://help.ubuntu.com
 *  Management:       https://landscape.canonical.com
 *  Support:                 https://ubuntu.com/advantage 

230 packages can be updated.
0 updates are security updates. 

New release ‘18.04.2 LTS’ available. 
Run ‘do-release-upgrade’ to upgrade to it.

*** System restart required ***
Last login: Mon Sept 26 11:46:26 2022 from 192.134.1.300
john@john-System-Product-Name:~$

2. Check if Composer is installed by running a Composer command

Do a readiness check to see if your server has a compatible Composer version (or has Composer installed at all) by using the command “composer --version.”

Follow the instructions at Download Composer to install the most recent Composer update.

--CODE language-markup--
john@john:/mst/projects/clean241/src$ composer --version
Composer 1.10.1 2022-09-26 11:50:30
john@john:/mst/projects/clean241/src$

3. Set Magento 2 to maintenance mode

Enable maintenance mode by typing “bin/magento maintenance:enable.” Maintenance mode lets you make programming changes to your e-commerce site without giving visitors access before the site is ready. (Once the extension is installed, you can leave maintenance mode by typing: “bin/magento maintenance:disable.”)An error message displays for those trying to access your site in maintenance mode.

Set Magento 2 to maintenance mode

4. Get the extension’s name and version

Retrieve an extension’s Composer name and version by visiting the Adobe Commerce Marketplace and employing the username and password you used to buy the extension. Then, follow these instructions.

  1. Select “Your name > My Profile”
  2. Select “My Purchases”
  3. Find the extension you want and select “Technical Details” for the information you need
Get the extension

Alternatively, you can find the Composer name and version of any extension (no matter where you got it) in the extension’s “composer.json” file.

5. Install the extension using Composer

To install an extension from the Commerce Marketplace, double-check that the repo.magento.com repository is located in your composer.json file. You must also update the composer.json file with the extension’s name and version by following these steps.

  1. Go to your Magento project directory to update the file
  2. Input your authentication or access keys (the public key is your username and the private key is your password)
  3. Let Composer finish updating your project dependencies and ensure there are no errors

--CODE language-markup--
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing j2t/module-payplug (2.0.2): Downloading (100%)
Writing lock file 
Generating autoload files

6. Verify the extension

You must verify the extension before enabling it.

  1. Use the following command to ensure the extension is installed so it works: “bin/magento module:status J2t_Payplug
  2. The default is to disable the extension and enter its name in this format: <VendorName>_<ComponentName> (this is different from the Composer name)
  3. If unsure of the extension name, run “bin/magento module:status” and look for it under “List of disabled modules”

7. Enable the extension

When enabling extensions, be aware that some won’t work correctly until you clear Magento-generated static view files.

  1. Employ the “--clear-static-content” option to remove static view files while you’re enabling an extension: “bin/magento module:enable J2t_Payplug --clear-static-content
  2. Then, register the extension with this command: “bin/magento setup:upgrade
  3. While in production mode, you might receive a message to recompile your Magento project, “Please rerun Magento compile command,” but this doesn’t happen in developer mode
  4. Use “bin/magento module:status J2t_Payplug” to verify the extension is enabled
  5. Flush the cache: “bin/magento cache:clean
  6. With its flexibility, the Adobe Commerce and Magento Open Source Framework lets you place an extension anywhere you like in the Admin panel. Standard connector-type extensions, for example, give you extra APIs designed to provide settings between the Magento software and another system. The required settings for these should appear in Stores > Settings > Configuration section. Appearing after the application’s listed settings, the extension setting details and configurations should show up in the section to the right of the Admin panel. The style you choose for the listing of your extension settings should be in keeping with the appearance of the application's listed settings
Configuration

Alternative methods for installing Magento 2 extensions

Besides using Composer to install Magento 2 extensions, you can do it manually with .zip files or use the Web Setup Wizard.

Manually from a .zip file

Manually install extensions to Magento 2 by following these steps to copy the extension files to the program’s installation folders.

  1. Get the .zip package for an extension you’ve bought on Magento marketplace by going to “My Profile > My Products > My Purchases”
  2. Choose the extension version you want to download and click its Download button
  3. Unpack the .zip archive into a new folder on your computer
  4. If you see folders like Api, Block, and Console rather than the nested folders “app/code,” you must make the nested folders
  5. Place the module files into the proper nested folder paths
  6. Copy the module to your Magento installation folder, uploading the module with the command “scp -r /local/dir/app user@remotehost:/remote/dir/
  7. Ensure everything is copied by using the SSH protocol to connect to your Magento host and find the extension installation folder in app/code/

Via the Web Setup Wizard

You can also install extensions by using Magento 2’s Web Setup Wizard. Note, however, that Adobe removed the Setup Wizard starting with Magento 2.3.7. For this version and above, users must employ the command line interface (CLI) (“bin/magento”) to install modules and extensions, as well as Magento itself and its upgrades.

  1. In the admin panel, go to System and click “Web Setup Wizard”
  2. Select the “Extension Manager”
  3. Not only does the Extension Manager list all installed components, but it enables you to add any extensions you have purchased (you need to be logged into your Magento 2 Marketplace account)
  4. Click “Review and Install” to see all the extensions ready to be added
  5. Select “Install” for any module you want to add

Get a job as a Magento Developer using Upwork

If you want to get work as an independent Magento developer, Upwork is the best place to find a huge variety of jobs to match all levels of experience. Find work by creating a profile on our job platform and highlighting your skills and experience. Search for work on our Talent Marketplace™, submit proposals, land contracts, and get paid securely after completing each assignment.

You can also submit projects to our Project Catalog™, which potential buyers can browse to select the work that meets their requirements.

Use Upwork’s tools and services to find remote Adobe Commerce (Magento) jobs, whether completing custom extension upgrades, enhancing online stores, looking for installation bugs, or something else. As a Magento developer, you’ll soon find why the field is a magnet for talent like yours.

Upwork is not affiliated with and does not sponsor or endorse any of the tools or services discussed in this article. These tools and services are provided only as potential options, and each reader and company should take the time needed to adequately analyze and determine the tools or services that would best fit their specific needs and situation.

Heading

asdassdsad
Projects related to this article:
No items found.

Author Spotlight

How to Install Magento 2 Extensions
The Upwork Team

Upwork is the world’s work marketplace that connects businesses with independent talent from across the globe. We serve everyone from one-person startups to large, Fortune 100 enterprises with a powerful, trust-driven platform that enables companies and talent to work together in new ways that unlock their potential.

Get This Article as a PDF

For easy printing, reading, and sharing.

Download PDF

Latest articles

X Icon
Hide