Magento 2 How to Upload Extension With Composer

This article will instruct you on installing Amasty Magento 2 extensions (or any other Magento 2 extensions) using the Composer. A lot of our customers were asking us how to exercise this with our extensions, and then here you are!

Learn what Magento Composer is from the official documentation →

Note: Please brand sure that you know what you're doing when following the instructions. If any actions or terms in the article cause confusion, please ask a professional to do the job.

As well equally you install and update Magento 2 using Composer, you can install our extensions, for this, you'll need:

  • An installed Magento ii and a Composer on your server
  • SSH server credentials
  • https://business.adobe.com Magento Marketplace business relationship
  • Extension package

Today we'll consider the settings on the example of our M2 Shop past Make extension:

  • custom sorting filters for brand products
  • slider with all brands
  • all-brands page
  • filter past brand
  • unique CMS for every brand
  • brand logo on product pages

Step 1. Magento.com account

Please become to https://business organisation.adobe.com and create an account, if you haven't done this before.

Log in the business relationship and go to the Market place tab:

Go to Magento Marketplace

Proceed to My Access Keys menu item:

My Access keys section

You tin can create a new access key or apply the existing one:

Use keys

Save the access keys, as they will be used in the following steps.

Make the local repository gear up

Log in to your server via SSH\SFTP and create a repo folder where it'southward user-friendly for y'all. In our instance, the full folder path will be /www/individual/magento/repo

Annotation: You can choose any proper noun for your folder, but delight make sure you change it while performing the following actions.

Copy your extensions folders into this newly created folder. Here's how the repo binder will look subsequently you do this:

folder contents

If the extension package was downloaded from Amasty website, you lot need to place the contents of /upload/app/code/Amasty/ into your newly created folder.

If your extension package has merely the contents of these folders, you lot'll take to create the folders manually. To get the correct folder name, cheque the registration.php file:

Create folders

Adding extensions to Composer and installing them

Log in to your server with SSH and go to Magento 2 folder.

Beingness in this binder, send the post-obit commands to Composer, telling it to add the extensions to the repository. Don't forget to replace the module name, the folder path and the module folder name with your own ones:

[php]composer config repositories.module_name path /world wide web/private/magento/repo[/php]

module_name is the name of the extension, and you tin can name this as y'all want.

At present that nosotros have added the extensions to the Composer, nosotros tin can install them. This command volition install amasty/[module_name]:


[php]composer require amasty/[module_name][/php]

If you lot're running the command for the first time, the Composer will inquire for your magento.com account credentials. Here's where you lot're going to apply Public Fundamental and Individual Key, obtained before.

Here'south how the command output volition look like:

Command output for installing Magento 2 extensions via composer

At present, let's finish the installation process:

[php]php bin/magento setup:upgrade[/php]

Congrats, your Magento extension is now installed via Composer.

More details

  • To install Amasty Base, apply the aforementioned steps, but mind the Base extension folder:

[php]composer config repositories.amasty_base path /www/individual/magento/repo/Base/[/php]

And for installation use the following control:

[php]composer require amasty/base of operations[/php]

  • You lot can install several Amasty extensions at once, adding the names of all the required extensions like so:

[php]composer require amasty/shopby amasty/promo amasty/rules[/php]

  • If you're installing an extension which is dependent on several extensions, yous don't demand to list all the dependencies hither. For example, amasty/shopby has six dependencies, but information technology'south enough to list simply amasty/shopby for the installation.

That is all for today.

Do yous take any questions on Magento ii Composer install or Magento Composer install? Please feel gratis to enquire us in the comments department.

andersoninve1944.blogspot.com

Source: https://amasty.com/blog/install-magento-2-extensions-via-composer/

0 Response to "Magento 2 How to Upload Extension With Composer"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel