Quick Way to Install Magento 2 Using Composer

5 easy steps to install Magento 2


Let’s understand the quick steps to install Magento 2 using composer just in the 5 steps quickly.

  1. Download & Install Composer
  2. Download Magento 2
  3. Setup Permission
  4. Create the Database
  5. Install Magento 2
Download & Install Composer

Have you’ve not yet installed composer ?

Don’t worry you can easily do so by using the following command in your terminal.

curl -sS https://getcomposer.org/installer | php
Download Magento 2

For downloading magento is so much easier & quicker with composer.

Run the following command in the root directory.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition

For example, let’s say we want to download Magento 2.4.2 in our root directory.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.2
Setup Magento Directory Permissions

Create the Database

After that next step is  you need to create an empty database to work with MySQL.

Just run the following command to create database:

echo "CREATE DATABASE magento2" | mysql -u[mysqluser] -p
Install Magento 2 

Once the permissions are set up and database is created.

Now it’s time to finally proceed with Magento 2 installation process with the last command.

You need to run the following command in your command line to install Magento 2 using composer.

php bin/magento setup:install 















For more options to add while installing Magento 2,

Please refer to the official guide by Magento.

Just wait for few minutes and you will see the following result.

Post installation file permissions check….
  For security, remove write permissions from these directories: '---/app/etc'
  [Progress: 1270 / 1270]
  [SUCCESS]: Magento installation complete.
  [SUCCESS]: Admin Panel URI: /admin
 Nothing to import.

You have successfully installed Magento using Composer!

However, if you still have any question or finding any difficulty to install the magento 2,

feel free to reach out to us.

Or, if you need help in setting up your eCommerce store, we would love to help you out!

4 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments

classy ebony stepdaughter screwed sensually.kirmiziyilan.com

Would love your thoughts, please comment.x