How to Install Magento 2.4 Version 2021

TryCoder
4 min readJan 24, 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?

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.

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

Let’s start the installation on the Local system

what is the system requirement for Magento 2.4 installation?

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(http://127.0.0.1/magento24/), I found the below error message

I am using the mac system. I have given the project folder permission for the above error solution.

How to install Magento using Command line

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

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

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=”http://127.0.0.1/magento24/" — db-host=”127.0.0.1" — db-name=”magento24" — db-user=”root” — db-password=”” — admin-firstname=”admin” — admin-lastname=”admin” — admin-email=”admin@trycoder.com” — admin-user=”admin” — admin-password=”admin123" — language=”en_US” — currency=”USD” — timezone=”America/Chicago” — use-rewrites=”1" — backend-frontname=”admin” — elasticsearch-host=127.0.0.1

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.

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.

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

  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/*

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

After, Run the successful Magento installation command, We need to run the below command.

You can also, visit our next Topics

How to install sample data in Magento 2

How to install Elasticsearch in the system and configure it.

Originally published at https://www.trycoder.com.

--

--

TryCoder
0 Followers

Try coder is a training website for learning web technologies online. Content includes relating to Magento, Node.js, JQuery, PHP , HTML, CSS with youtube videos