Home Magento Magento 2.4.3 installation with Sample Data on localhost Xampp Using Command line

Magento 2.4.3 installation with Sample Data on localhost Xampp Using Command line


Magento 2.4.3 installation with Sample Data on localhost Xampp Using Command line include Elasticsearch and explained in simple way step by step.

During the installation of Magento 2.4.3 using the command, many errors are going to come. All the error fix during the installation process and for that, each code snippets are discussed.

You can also check for other Magento installation

Magento 2.3 Installation
Magento 2.4.2 Installation

Complete Guide of Magento 2.4.3 installation with Sample Data on localhost Xampp Using Command line

Below are the steps explained for the installation latest Magento 2 version using step by step.

Magento 2.4.3 installation with Sample Data on localhost Xampp Using Command line

The installation of Magento 2.4.3 required Composer, Xampp on localhost, Elasticsearch and
Elasticsearch is important for the installation of Magento 2.4.3 and other versions also.

You going the see all the discussions of Magento 2.4.3 in detail and step by step.

Magento 2.4.3 Requirements

To Fulfil the installation of Magento 2.4.3 smoothly and easily, some of the important requirements are shown in given below.

Elasticsearch requirements 2.4.3

Magento 2.4.3 important requirement to fulfil before Installation

For Magento 2.4.3 Installation following points are important for a successful installation.

  • PHP 7.4
  • Apache 2.4
  • nginx 1.8
  • Varnish 6.4
  • Redis 6.0
  • MySQL 8.0
  • Elasticsearch 7.9
  • Composer 2.x

For Detail information regarding you can check to visit Magento Requirement 2.4.3

How to Install Xampp in Windows 7,8,10 (2021)

Installation of Xampp for Magento 2.4.3 on the window is very easy. It needs PHPMyAdmin for database, PHP, and many more. To Install the Xampp very easily and smoothly check with the below download link.

Xampp Download

Download Xampp

To Xampp download enter in the google search engine to download Xampp. You will get the page of download official site from where you can download Xampp. There you will find Xampp for different Operating systems such as Mac, Windows, and Linux (Please check the official site for detail).

How to Install Composer in Windows 7,8,10

With the help of the below link, you can download Composer for Operating System Windows 7, 8 and 10.

Download Xampp for a different version of Window

It is very important for managing the different library management tools for various packages of PHP in many different cases. To download the composer click, the Exe file for the installation process. After completion of installation, check the composer for working properly or not by entering the command using cmd.

You will result like the below screen

Composer Ver Check

Using the command called composer you can check the version of the current composer like above 2.1.5 which is used in the case of Magento 2.4.2 installation. For clarification, you can check the above image regarding the ver. In the requirement, mentioned as 2.x. S0 is compatible.

Install Elasticsearch on Windows for Magento 2.4.3

In the case of Magento 2.4.3 installation, Elasticsearch is an important role. The system verifies and it is done due to Elasticsearch installation, configuration. The process is done during installation. If anything gets wrong the installation will stop.

Visit the link to download Elasticsearch: Download Elasticsearch.

Elasticsearch Download

Unzip the folder of downloaded Elasticsearch and then the next step is to check the bat file of Elasticsearch present inside the bin folder.

The path of the folder Elasticsearch-7.13.4\bin\

Right, Click on this bat file to run as an administrator.

Run Elasticsearch Bat file

An important part regarding this Elasticsearch is that it is always to run background during the installation of Magento 2.4.

The result of Elasticsearch looks like a given image during the running process.

Elasticsearch Run

To check the Elasticsearch run, just open the given URL “localhost:9200”.

If the output is like below, then Elasticsearch Run properly.

Elasticsearch Work Properly

How to Install Magento 2.4.3 using command line on localhost Xampp

Before doing the installation of Magento 2.4.3 using composer on localhost, it is necessary to configure the php.ini file so that, installation to be done smoothly without getting errors regarding extension and memory issues.

Configuration of PHP ini file for Magento 2

The extension is very important for the installation of Magento 2.4.3, it is necessary to check to enable or not so that installation takes place smoothly. if it is not enabled, then we have to enable it by removing the column.

After removing the sign “;” which is present at the start, then save the file and restart Apache in Xampp.

Below are some of the extension we have to check it,

Extension for Magento 2.4.3 requirement

You can enable it easily by visiting the folder the path c:\xampp\php\php.ini

And also you can do it by opening the file using the Xampp and After making changes just save the file and restart the Apache, MySql in Xampp.

Configure php ini file

Some of the specific extensions are necessary and important to enable it. Below are given, you have to check it and enable it. Also, you have to make changes regarding the memory necessary for installation.

as set max_execution_time=18000

After changes to be done, save the file and restart the Apache.

Create Database for Magento 2.4.3 Installation

Now the next step is to create a database with the help of PHPMyAdmin, for that, you have to open the Xampp and click on the button called admin of MySQL row section.

Open PHPMyAdmin

Now our next step is to create a database during the process of installation Magento 2.4.3 using PHPMyAdmin.

Create Database

Using shell you can change the password with the help of a command using the shell in Xampp for you have to open the shell and then enter the below-given command which helps in changing the password. Password is not set to default in MySQL on Xampp.

Open Shell

With the help of the below-given command, you can easily set the password using the shell.

mysqladmin.exe -u root password yoursetpassword

Another method is by doing changes to the file to set the password. And the file path to set a password

Add Password to set a password

Install Magento 2.4.3 using composer on localhost Xampp with sample data (command line) 2021

For creating one good and professional domain during the installation, that, we going to change the domain from localhost to a professional domain such as www.domain-name.com. To do this, you have to do changes to some of the following files present which are given below the following path.

The 1st filename httpd-vhosts.conf and path C:\xampp\apache\conf\extra\httpd-vhosts.conf and another file is the host file and the path is given below.

Change localhost to Custom Domain

After doing all these changes, you have to save the file and restart MySQL and Apache in Xampp.

How to Install Magento 2.4.3 using the command line

With the help of the below-given command to download and install Magento in a different version.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=<magento-version> <directory-name-to-install>

// For Magento Version 2.4.3 command (example)
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.3 magento243/
Magento Installation Process

The installation process of Magento 2.4.2 using command line

To install Magento 2.4.3 use the below command. RUN Elastricsearch Background during the process of installation as mention above regarding Elastricsearch.


php bin/magento setup:install --base-url="http://www.magento243.com" --db-host="localhost" --db-name="magento24" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email="demo@gmail.com" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200

Replace these values:
–base-url: your magento 2 installation folder
–db-name: your database name
–db-password: your database password

Installing of Magento 2.4.3 process

Installation Process

During the installation, you will get an error regarding the Image Adapter for trying to open image files Gd2.php Line No. 72

The error is occurring due to a function called validateURLScheme function. Returns false due to checking of URL format, because the local file format is not valid. It is easy to fix this error for that you have to do minor changes so it works properly in the file called Gd2.php

Follow the step to work properly, You have to make minor changes in the code place in the file present at the path at the line near 92.

To solve this an Error Regarding the Gd2 Image Adapter clicks to visit Solution For Gd2 in detail

Magento 2.4.3 install sample data Using Command-Line

The next step is to install sample data, with help of the below command to install sample data is given below.

php bin/magento sampledata:deploy
Install the Sample Data using command line

The next step is now to enable all the modules, to enable it to use the below command. after enable check the Elasticsearch is working background or not. To check it browse with link localhost:9200 as shown above in the image.

php bin/magento module:enable --all
Enable all module

Now the last step is used to install Magento 2.4.3 using the set upgrade command given below

php bin/magento setup:upgrade
Magento Installation Process

Successfully done, Installation Magento 2.4.3

Finally done with the complete installation of Magento 2.4.3.

After doing all this use the below command to complete the process.

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Static Content deploy command
command php binmagento setupstatic-contentdeploy -f 

Error Solution for Magento 2 blank screen after installation

Many users get Magento 2 blank screen after installation and frontend lank page issue, To fix this issue you have to make the small change in the given file below and file path vendor\magento\framework\View\Element\Template\File\Validator.php

Make the change in the file Validator

$realPath = $this->fileDriver->getRealPath($path);

Replace with the below-given code.

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

For the complete detail regarding this error, visit the link to the Blank Screen Solution.

After Successful installation of Magento 2.4.3 front and admin, you will get the out as given below. Just refresh the browser by using link base URL of your Magento 2.4.3 installation

Front End Magento 2

Admin End after the installation of Magento 2.4.3

Admin End Magento 2

During the Login Process of Magento 2.4.3 getting the Error like given below in the image.

The Error is “Failed to send message please contact administrator”

Admin – Login Error

To Fix the Error you have to disable the module called “Two-Factor Authorization” on the localhost

Use the below command to disable the module

php bin/magento module:disable Magento_TwoFactorAuth
Disable Module

After doing the disabling above module use flush command cache and again login to the admin.

Then due to this, you can easily log in to the admin. Finally done all processes of a Magento installation.

Done Magento 2.4.3 installation Successfully.



Please enter your comment!
Please enter your name here

Exit mobile version