Install Magento Modules

Learn how to install new modules and extensions in Magento

Install Extensions via Magento Admin Panel

To install a module/extension via Magento's Admin Dashboard, you should go to the System menu > Tools section > Web Setup Wizard.

This would redirect you to Setup Wizard page where you should click on the Extension manager option.

This would redirect you to enter your repo.magento.com credentials to connect to Magento Marketplace:

You would be redirected to a new page where you may review the extensions you have installed and new ones that you can install. Select the chosen extension by adding a tick in front of it and click the Install button to initiate the process.

This would redirect you to a new page where you should initiate Readiness check by clicking on the Start Readiness Check button.

Once the check is ready and if the extension is compatible with your website, just click on the Next button.

The next step is to choose whether you would like a backup of your application or not.

Once you choose what you want to backup, click on the Create Backup button. In case you do not want a backup, untick all and click Next.

This would take you to the final step where you should finalize the installation process by clicking on the Install button.

Once the installation is completed you would see the message below in the console log:

Install Extensions Using Composer

For the purpose of this tutorial, we would install the Image Optimizer extension downloaded from Magento Marketplace. Via the Downloads menu at Magento Marketplace you may see the system name of the extension that should be used in the composer.json file. Write it down as you would need it later. In our case - it is apptrian/image-optimizer.

The next step would be to find the composer.json file in your Magento installation's root folder and find the require section in it. The section should look like the one below:

To have the apptrian/image-optimizer extension installed using Composer, you should add the following in the require section:

In our case it would look like as follows:

You can edit the file by using the File Manager tool in your cPanel or over FTP. This is how the section looks like after editing it.

The next step would be to connect to your account via SSH and navigate to the location of your Magento application. Then update composer's dependencies by using the command below.

This would prompt you to enter your authentication keys. Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors. The output should be similar to the one below.

This would install the extension but would not enable it. To enable it, list the existing extensions, find the newly installed one and enable it:

The final steps to register the changes would require running the commands below.

That's it. Your extension is successfully installed and enabled now.