Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Update Magento 2 using Composer

Updating your Magento 2 installation is very easy if you use Composer. Below you will find all the steps you need to take to update the system quickly. Updating through composer can be done both with the Community Edition as well as the Enterprise Edition.

Open up your favorite CLI (Command Line Interface) and navigate to the root of your Magento 2 installation. Start to follow the steps outlined below.

  1. Download the update with composer that fits your version of the system (CE or EE). Please be aware that you need to change the version numbers to the most recent one when you’re reading this.
    Community Edition:
    composer require magento/product-community-edition x.x.x --no-update
    
    Enterprise Edition:
    composer require magento/product-enterprise-edition x.x.x --no-update
  2. Execute the update by using the following command
composer update
  1. Remove some folders
    rm -rf var/di var/generation
  2. Clear cache, upgrade, compile and reindex
    php bin/magento cache:flush
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento indexer:reindex
  3. Check the Magento 2 version number by running this command
    php bin/magento --version

You have now succesfully upgraded your Magento 2 installation with composer! If you have any more questions, don’t hesitate to ask us in the comments below this article, and we’ll answer them as soon as possible!

The post How to Update Magento 2 using Composer appeared first on Coding Basics.



This post first appeared on Coding Basics - Programming & Magento Tutorials, please read the originial post: here

Share the post

How to Update Magento 2 using Composer

×

Subscribe to Coding Basics - Programming & Magento Tutorials

Get updates delivered right to your inbox!

Thank you for your subscription

×