How to install Magento 2.4.x

How to install Magento 2.4.x

How to install Magento 2.4.x

You asked, and we heard. Here you go, a small guide on how to install Magento 2.4.x. 

Install Magento 2.4 and start with the most prominent features of the latest version like:

  • 2FA security for Magento 2 admin panel
  • Purchase approval workflows
  • Seller assisted shopping
  • In-store pickup
  • New media gallery
  • PWA Development
  • Headless commerce

Please click here to check out the detailed features of Magento 2.4.

We are pretty much excited, and I’m sure you are too!

Now, the Installation of Magento 2.4 can be done in 2 ways.

  1.    composer (Using command line)
  2.    compressed package

Method 1: Installation using composer (command line):

You should have the following system requirements: 

  • PHP 7.4.x and its extensions

Run this command to install php extensions :

sudo apt-get install php7.4-bcmath php7.4-common php7.4-curl php7.4-xml php7.4-gd php7.4-intl php7.4-mbstring php7.4-mysql php7.4-soap php7.4-xsl php7.4-zip

  • Mysql8
  • Elastic search 7.6.x (If you don’t have elastic search already, please find the here the installation steps)

Now follow the below steps to install Magento 2.4:

1. Run this command in terminal =>

 composer create-project –repository-url= magento/project-community-edition 2.4.1

(if it asks for username and password, please provide access keys from

2. Go to your project directory.

3. Create a database and grant all privileges for the database.

4. Now run the below command in your project directory.

Note: Please change details in the below command

php bin/magento setup:install –base-url=”yourwebsiteurl” –db-host=db-host –db-name=db-name –db-user=db-user –db-password=db-password –admin-firstname=Magento –admin-lastname=User – –admin-user=admin –admin-password=admin123 –language=en_US –currency=USD –timezone=America/Chicago –use-rewrites=1 –search-engine=elasticsearch7 –elasticsearch-host=yourhost-name –elasticsearch-port=port-no –backend-frontname=admin

5 : Run  “bin/magento setup:upgrade” command. 

6 : After the Magento installation is completed for a better experience, deploy the sample data.

7 : Run “bin/magento samplecontent:deploy” command to deploy sample data on your site.

8 : Run below set of commands:

  • bin/magento setup:upgrade
  • bin/magento setup:di:compile
  • bin/magento static-content:deploy -f
  • chmod -R 0777 app/ var/ pub/ generated/

Method 2: Installation using package

  1. Download the package from the Magento official site (link goes here) and extract it to your project directory.
  2. Follow the same steps from step 3 as mentioned above in Method 1.

Hurray, Magento2.4 installation completed!!!

If you have any doubts about the installation process, I’d be happy to help you out.

Thank you!

Go to Source of this post
Author Of this post: Bhaskar P
Title Of post: How to install Magento 2.4.x
Author Link: {authorlink}