How to Install Magento 2.4 Version 2021

How to Install Magento 2.4 Version 2021

Magento released the latest Magento 2.4 version. Most of the developers face installation problems. We can not install manually Magento 2 using the browser. We required the composer for Magento's latest version installed.

How can we download the Magento 2 latest version?
Go to the Magento official website and go to the download tab.  Click the Latest Magento download
We can install Magento using composer. Go to the bottom of the download page and select the latest Magento 2 version and select the zip formate as per the below screenshot. If you want to include the sample data in tick the checkbox.

How to Install Magento 2.4 Version (2021)

what is the system requirement for Magento 2.4 installation?
  1. Support PHP 7.4
  2. Elasticsearch 7.6.x
  3. MySQL 8.0

What is the main feature in Magento 2.4 version?
  1.   Authorize.Net method integration has been removed from core code
  2.   2FA security featured added for Magento 2 admin panel
  3.   The improvements to core quality.
  4.   Added the 30 security enhancements
  5.   Inventory Management and Progressive Web Applications (PWA Studio) are released independently
  6.   New media gallery
Note: For More information about new featured and changes, Go to the Magento Open Source 2.4.0 Release Notes

Let's start the installation on the Local system
How to Install Magento 2.4 Version (2021)

Start your local server and add the Magento version zip file. Extract the downloaded zip file. Now the database server and create the new database. when I run the project on the browser(, I found the below error message

How to Install Magento 2.4 Version (2021)
I am using the mac system. I have given the project folder permission for the above error solution.

sudo chmod -R 777 magento24  Now I got the below message on my screen. So, We need to install Magento using the command line.

How to Install Magento 2.4 Version (2021)

How to install Magento using Command line

Open the system terminal and go to your project root folder As per the below screenshot.

How to Install Magento 2.4 Version (2021)

Now, We need to run the below command in the terminal. Make sure, We need to add all the required and correct server details.

php bin/magento setup:install --base-url="" --db-host="" --db-name="magento24" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email="" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --elasticsearch-host=
I found the below error on the server. Because my system's current version is PHP 7.2.33. I need to move PHP 7.4 version using the below command on the Mac system.
How to Install Magento 2.4 Version (2021)

Command : 
export PATH="/usr/local/opt/php@7.4/bin:$PATH"

export PATH="/usr/local/opt/php@7.4/sbin:$PATH"

Now, let's check the current PHP version and run the Magento command. 

How to Install Magento 2.4 Version (2021)

make sure, Before running the Magento command need to validate a connection to Elasticsearch. Otherwise, you will face the below error.

How to Install Magento 2.4 Version (2021)

Note: If you are facing the memory limit issue, then use the "-dmemory_limit=5G", before bin/magento in your command.

How to Install Magento 2.4 Version (2021)


After, Run the successful Magento installation command, We need to run the below command.
  1. php -dmemory_limit=5G bin/magento c:c
  2. php -dmemory_limit=5G bin/magento s:up
  3. php -dmemory_limit=5G bin/magento s:d:c
  4. php -dmemory_limit=5G bin/magento s:s:d
  5. sudo chmod -R 777 var var/* pub pub/* generated generated/* app/etc/*
How to Install Magento 2.4 Version (2021)

We will discuss the below point in the next video.
How to install sample data in Magento 2
How to install Elasticsearch in the system and configure it.
Ask Question #trycoder
Facebook Page👉
Watch more videos here
Click to SUBSCRIBE to more Videos!

Please Like, Comment, Share and Subscribe THANK YOU!