How To Install Magento 2 Using Composer In Windows
Besides installing Magento ii extensions via SSH manually , installing via composer is another very common and simple way used by a lot of Magento users.
In this article, nosotros will provide yous with footstep-past-stride instructions on how to get a Magento 2 extension installed on the website past Composer.
Now, let'due south kickoff with us!
Step 1: Create Access Keys And Become The Package Data
Send united states an email to sales@bsscommerce.com along with the social club number. We will create admission keys as per your requirement and then provide you with data nigh the packages.
Footstep 2: Configure Composer Repository
Firstly, yous demand to add together a new composer repository to the BSSCommerce Composer Repository.
Type the post-obit command in the root directory of Magento:
composer config repositories.bsscommerce composer <path>
In the path point:
- https://composer.bsscommerce.com/customs – for Community extensions.
- https://composer.bsscommerce.com/enterprise – for Enterprise extensions.
Step 3: Install Extension
A - Install a whole bundle/kit/combo or individual extension
Once you take the package name and version, install the Magento 2 extension by executing the following control:
composer require package_name - For the latest version
composer crave package_name:version - For the older versions
For example, yous want to install the BSS One Footstep Checkout extension, please execute the following command:
- For the latest version:
composer require bsscommerce/module-one-step-checkout
- For version 2.one.2:
composer crave bsscommerce/module-one-pace-checkout:two.i.2
When you run this control for the start time, CLI will inquire you to enter the Username and Password. Please fill in the access key created in Pace 1.
Note: The Public primal corresponds to the Username, and the Private key corresponds to the Password.
Composer will inform a bulletin to you. If you lot want to save the Access cardinal, please type Y .
In case you already saved the Admission cardinal in the server, but you desire to use another Access central, do the following:
Open the file ~/.composer/auth.json and delete the username/password of the corresponding repository:
And then you install the module as usual:
php bin/magento setup:upgrade
Note: In case of occurring error, it could be that the Access key you lot entered is wrong, your account does not have access to this package, or the version you entered does not exist.
- If you desire to update the latest version of the extension, run this control:
composer update package_name
- If you want to remove the extension, run this command:
composer remove package_name
- If you want to update some other version, not the latest version of the extension, run this command:
composer remove package_name
composer require package_name: version
Note: If you installed extensions via SSH (by uploading the package) earlier, then when updating the extension via composer, running the command setup:upgrade will neglect. In this instance, you take to delete the folder you uploaded in app/lawmaking/…
B - Install specific extensions within a packet/kit/philharmonic
This section is merely useful if you lot want to install the specific extensions within a package/kit/combo, e.yard. you want to exam some specific functions first, or there are some extensions you do non want to install at all.
- To install item modules within a package, you lot just have to install them separately:
composer crave bsscommerce/add together-multiple-products
The version to be installed volition be the latest version.
- To remove specific modules, similarly, y'all remove them separately:
composer remove bsscommerce/add-multiple-products
C - Install Hyva compatibility modules
Installation via composer volition run the control:
composer require package-name:dev-hyva-master --prefer-dist
NOTE
For the instance of installing a package/kit/philharmonic, yous can merely choose ane amid these ii options: install the whole parcel or install individual extensions. Using both ways may result in some issues.
If you already followed one approach, and want to switch to the other, you need to run the remove control first.
---
This is a consummate installation process you lot can follow to have a Magento ii module on your website.
Thanks for reading our article! Promise information technology is helpful for you lot!
Source: https://wiki.bsscommerce.com/docs/faqs/install-magento-extension/install-magento-2-composer/
Posted by: gainesfreace.blogspot.com
0 Response to "How To Install Magento 2 Using Composer In Windows"
Post a Comment