How to Install Magento 2.4 with Command Line?

How to Install Magento 2.4 with Command Line

Do you want to know how to install Magento 2.4 with Command Line?

Magento 2.4 is the latest Magento version. It is faster and better than earlier versions. 

With the upgrade, there are some new features introduced, such as elastic search as the default catalog search engine, and inbuilt lazy loading image function.

But there are few features that Magneto has removed from the core code. Like third-party payment gateways.

Magento 2.4 has removed the Setup-Wizard, and one has to install the Magento 2.4 with CLI or Command Line method.

Read this: Magento 2 Requirements

Installing Magento 2.4 with Command Line

Step 1: Log in to Magento Servers

You need permission to write to the Magento file system or get access to the account with such permissions.

Bash Shell users can use the following syntax to switch to the Magento file system owner and enter the commands simultaneously.

su <Magento file system owner> -s /bin/bash -c <command>

Use the following command if you don’t have the Magento file system owner logins::

sudo -u <Magento file system owner> <command>

To run Magento commands from any directory, add <magento_root>/bin to your system PATH.

Step 2: Helpful Magento Commands

Get the complete list of commands, enter the following command:

bin/magento list

Get the help for particular commands, enter the following command:

bin/magento help <command>

Step 3: Install the Magento Software from the Command Line

The install command uses the following format:

magento setup:install --<option>=<value> ... --<option>=<value>

Admin Credentials:

The following table shows the user information and credentials for the Magento admin user.

NAMEVALUEREQUIRED?
–admin-firstnameMagento administrator user’s first name.Yes
–admin-lastnameMagento administrator user’s last name.Yes
–admin-emailMagento administrator user’s e-mail address.Yes
–admin-userMagento administrator username.Yes
–admin-passwordMagento administrator user password.Yes

Click here for Information.

Step 4: Verify the Installation

Verify the storefront

Open your browser and go to the storefront. Enter your Magento store URL.

If the Magento installation base URL is “http//www.example.com,” enter it into your preferred browser.

If this page loads up, it means the Magento installation is successful. This is a sample storefront page with no data.

sucess magentoi instaltion magento 2.4 with command line

Verify the Magento Admin

Open the Magento Admin in any web browser.

For example, let’s say your Magento store base URL is: http://www.example.com

And your Admin URL is: admin_ServerGuy

Put in the browser: http://www.example.com/admin_ServerGuy

You can change, or assign the Admin URL from the backend-frontname installation parameter.

A box will open up that will ask your login information. Enter your username and password, and your dashboard will come up.

Your Magento installation is successfully done, and your store is ready if it looks like this:

magento admin done magento 2.4 with command line

Final Words

The latest version of Magento i.e., Magento 2.4, has removed the setup wizard. This post will help you to install Magento 2.4 with the command line. 

If you encounter any issue, you can leave it in the comment box.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new modules, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

We can help you. Right now.

Fast growing merchants depend ServerGuy for high-performance hosting. Experience counts. Let's get started.

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

Core Web Vitals Book COver

Is your website ready for Core Web Vitals?

Take this FREE book with you and optimize your store for speed.

Learn all about new Google new ranking factors and get that top ranking.