---
title: "Upgrade Magento 2 with Composer"
url: "https://magecomp.com/blog/upgrade-magento-2-composer/"
date: "2020-05-25T18:30:45+00:00"
modified: "2020-05-25T18:30:45+00:00"
author:
  name: "Gaurav Jain"
  url: "https://magecomp.com/"
categories:
  - "General"
  - "Magento Tutorials"
word_count: 367
reading_time: "2 min read"
summary: "Hello Magento Folks,"
description: "Magento 2 often brings the upgrades and for which all the merchants have to upgrade their store every time. Learn How to upgrade Magento 2 with the composer ..."
keywords: "General, Magento Tutorials"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Change Domain Name in Magento 2?"
    url: "https://magecomp.com/blog/change-domain-name-magento-2/"
  - title: "How to Upgrade Magento Version from 2.3.X to 2.4.2"
    url: "https://magecomp.com/blog/upgrade-magento-version-from-2-3-to-2-4/"
  - title: "Quantum Computing for Ecommerce: Revolutionizing Online Retail"
    url: "https://magecomp.com/blog/quantum-computing-for-ecommerce/"
---

# Upgrade Magento 2 with Composer

_Published: May 25, 2020_  
_Author: Gaurav Jain_  

![How to upgrade Magento 2 with composer](https://magecomp.com/blog/wp-content/uploads/2020/05/How-to-upgrade-Magento-2-with-composer-1024x512.webp)

**Hello Magento Folks,**

How are you all doing? We are going to learn today about How to upgrade Magento 2 with the composer. Learn step by step solution to this problem further in this blog. If you have missed our last article **[How to Change the Logo in Magento 2](https://magecomp.com/blog/change-logo-magento-2/)**

## Introduction:
Magento 2 often brings the upgrades and for which all the merchants have to upgrade their store every time. Mainly, the installation of the newest version is very important to use the latest features of Magento 2. The security fixes will be an advantage to your store when you upgrade to Magento 2 latest versions. It will increase your store performance which will help you in increasing customer experience. Today I am going to explain to you how to upgrade your Magento 2 store with the help of the composer.
## How to Upgrade Magento 2 with composer:
**Step 1:** Firstly, you will require SSH access to your server to implement commands via the command line. Login with SSH credentials on the server and navigate to your Magento 2 root directory and fire the following command.
*composer require magento/product-community-edition {version} –-no-update*

**Step 2:** Now, for updating the composer.json version and fire the following command and start version update.
*composer update*

**Step 3:** After the above command implementation, fire the below commands.
*rm-rf var/di var/generation*

*php bin/magento cache:clean*

*php bin/magento cache:flush*

 **Step 4:** Now update the database schema with the below command:
*php bin/magento setup:upgrade*

 **Step 5:** Now, run below command to run the compiler.
*php bin/magento setup:di:compile*

**Step 6:** Deploy the theme files with the below command.
*php bin/magento setup:static-content:deploy*

**Step 7:** Now reindex the data of the database.
*php bin/magento indexer:reindex*

After applying the above commands check the version it will be upgraded.
## Final Words:
I hope the above implementation will be helpful for you and if you feel any problems in the above solution then do visit our **[Support Team](https://magecomp.com/support/)**. Also, take a look at our **[Magento Upgrade services](https://magecomp.com/magento-upgrade-service.html)** to make your work effortless. Make sure you share with your Magento friends for helping them to solve the problems and also comment down your reviews in your comment section below.
Happy Reading.


---

_View the original post at: [https://magecomp.com/blog/upgrade-magento-2-composer/](https://magecomp.com/blog/upgrade-magento-2-composer/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-18 07:35:11 UTC_  
