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.

NAME VALUE REQUIRED?
–admin-firstname Magento administrator user’s first name. Yes
–admin-lastname Magento administrator user’s last name. Yes
–admin-email Magento administrator user’s e-mail address. Yes
–admin-user Magento administrator username. Yes
–admin-password Magento 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.

Posted by Editor