Magento 2.4.3 Installation: Steps By Step Guide for XAMPP

The latest version of Magento is out again, so in this post, we will know the Magento 2.4.3 installation steps on the windows operating system.

Will install Magento on XAMPP server as well as install elastic search first in order to complete the setup of installation.

 

Steps By Step Guide of Magento 2.4.3 Installation

I am telling you the steps of Magento installation, following which you can install jump server on your windows operating system and how to use Magento 2.4.3.

Elasticsearch is mandatory in all the onwards versions of Magento 2.4, so first, we have to configure elastic search.

As we know that Magento 2.4 version can be installed only through composer installation.

GUI installations have been removed from all versions of Magento 2.4, so we have to install composer as well.

Let us know how many steps are followed by which you can install agents on your local system.

 

Step 1: Install XAMPP Server

In the first step, you have to set up the XAMPP server on your windows. You can use the below link to download the xampp.

Download XAMM Server for the Magento 2.4.3

After the download, you have to install this software and then start Apache and MySQL.

Xampp Server Instllation on Window for Magento 2.4.3 Installation

Step 2: Install Composer

Composer is required for all versions of Magento 24.

Installation without composer is not provided in upcoming versions of 2.4.

To install composer you can download composer from the given link.

Install Composer on Window

After your composer is successfully installed, the screen will show something like this.

Now after this you have to go to the next stage by clicking on it.

Finish Composer Installation

If you want to verify whether the composer is installed correctly or not or whether the composer is running in your system.

For this, you go to the root directory of Magento and type composer version there, then your screen will look something like this.

 composer --version

Check composer version for Magento 2.4.3 Installation

 

Step 3: Install Elastic Search on Window

Elasticsearch is required for catalog product search in Magento 2.4 and onwards version.

The core development team of Magento 2.4 does not provide you with the installation facility without Elasticsearch.

To install Elasticsearch you can download it from the given link.

 

Put the apps file in the htdocs folder of the jump server and then extract it there.

Elastic Search Start on XAMPP for Magento 2.4.3 Installation

Then go to the bin folder of elastic search and right-click on the second file and run as administrator, your elastic search will start.

Start Elasticsearch

Verify Running Status of Elastic Search

If you want to confirm whether your elastic search is running successfully in your jump server or not.

For this, you have to open the browser and enter the localhost and port number in the URL of that browser, then you will see the screen something like the image below.

localhost:9200

Check Running Elasticsearch Status

System Requirements for Elasticsearch

Elasticsearch consumes a lot of RAM. For this you must have at least 8GB RAM, otherwise, it will not run properly and your system will hang.

Therefore, the recommended advice to you is that if your computer or laptop has less than 8GB of RAM, then do not install Elasticsearch.

Elasticsearch RAM Consumption

 

 

Step 4: Configure php.ini in XAMPP

There are some important extensions that we need to keep enabled for Magento 2.4.3 p1 to run properly.

In the XAMPP server some extensions are enabled by default but some we have to enable, for that we have to go to the php.ini file and remove the semicolon

Required PHP extensions

We need the following extension for the Magento 2.4.3 p1 version.

bcmath, ctype, curl, dom, gd, hash, iconv, intl

mbstring, openssl, pdo_mysql, simplexml, soap, xsl, zip, ext-sockets

Go to C:\xampp\php\php.ini

Quick Tip: If you want to open the php.ini file quickly, then for this you go to XAMPP Control Panel.

Then there you will see the config option on the right side of Apache, click on it.

On clicking, the option of php.ini file will appear, open it

;extension=intl
;extension=soap
;extension=xsl
;extension=sockets
;extension=sodium

Now Remove ; from the above lines of php.ini file.

Save the file.

 

Configure php settings

Now change the value for following parameter In php.ini file,

max_execution_time=18000
max_input_time=1800
memory_limit=4G

After making these many configuration changes, there will be no interruption in your Magento 2.4.3 installation and the installation process will run smoothly.

  • Now restart apache from the XAMPP control panel.

 

Step 5: Create Database for Magento 2.4.3 Installation

Now you have to type localhost PHPMyAdmin in your browser and create a database there then we will use that database while installing magento.

localhost/phpmyadmin

The default username of MySql for the jump server is root and the password is blank, so we need to reset the password.

For this, by going to the jump control panel, click on the cell command there, then run the command below, your screen will look something like this.

mysqladmin.exe -u root password yourpassword

change mysql password

The default password of the database was blank, which we have reset, so our database will not open automatically and will ask you for the password.

So if you want to log in automatically, then for this you have to enter the password by going to the config file of MySQL, then as soon as you open the admin of PHPMyAdmin, you will open the database, then automatically login will be done.

D:\xampp3\phpMyAdmin

File Name: config.inc.php

Password Changes of PHPMyadmin

Step 6: Run Magento 2.4.3 Installation Command

In this step, you have to go to the Magento official website (https://magento.com/tech-resources/download) and download the 2.4.3

Download Magento 2.4

When downloaded, put it in the htdocs folder of XAMPP then unzip it.

 

Required Server Configuration

The Magento app is served from /var/www/html/m234p1s/pub.

We need to set the document root to the pub, to do this go to file

D:\xampp\apache\conf\extra\httpd-vhosts.conf

Add this content at the bottom of the file.

<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/m243p1s/pub"
ServerName yourname.magento.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
</VirtualHost>

Where,

DocumentRoot "D:/xampp/htdocs/m243p1s/pub" is the location of the magento2 folder path

yourname.magento.com is the base url. Ex: – m243p1s.com

Now let's open

C:\Windows\System32\drivers\etc\hosts

the file in notepad++ and add the below line at the bottom of the file.

127.0.0.1 yourname.magento.com

Now all your setup is ready so that you can run the Magento installation command.

For this you can once again make sure that your MySql is running or not, Apache is running or not, Elasticsearch is running or not.

When all these are running properly then only you run the command given below.

Go to the root folder in which you have extracted magento and open then run the below command.

D:\xampp3\htdocs\m243p1s
php bin/magento setup:install --base-url="http://m243p1s.com/" --db-host="localhost" --db-name="m243p1s" --db-user="root" --db-password="root" --admin-firstname="admin" --admin-lastname="admin" --admin-email="cs.hemantsinghtech9@gmail.com" --admin-user="admin" --admin-password="Admin@#123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200

Magento 2.4.3 Installation Steps

Note:

Make sure to replace these values:

– base-url: your magento 2 installation folder

– db-name: your database name in step 3

– db-password: your database password in step 3

 

Unable to apply data patch Magento 2.4.3 Installation

Magento 2.4.3 Installation Issue

Now as soon as you run the command, you will see some issue, you can resolve the above issue by changing the file of the path given below.

Unable to apply data patch

Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file

In Gd2.php line 72: Wrong file

private function validateURLScheme(string $filename) : bool
{
$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
$url = parse_url($filename);
if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {
return false;
}

return true; 
}

Now again, re-run the above installation command.

Magento 2.4.3 Installation Steps

Magenta 2.4.3 installation step is completed but when you hit this URL on the browser you will find that CSS and js are not loading.

To solve this, you have to change some of the files given below, then after that run the command, and then the issue will be resolved.

 

Solution of Not Loading CSS and JS

Here’s how to fix CSS and js loading issues:

Go to:

D:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\Template\File

Edit Validator.php

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

Replace with this code:

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

Or just copy-paste the below code

protected function isPathInDirectories($path, $directories)
{
if (!is_array($directories)) {
$directories = (array)$directories;
}
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
foreach ($directories as $directory) {
if (0 === strpos($realPath, $directory)) {
return true;
}
}
return false;
}

Now, Save this file.

Then, go to the app/etc/di.xml in the editor,

– Find the path

“Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink”

and replace to

“Magento\Framework\App\View\Asset\MaterializationStrategy\Copy”

Save the file.

Next, you will need to run the below commands to upgrade the database and deploy static view files

php bin/magento indexer:reindex

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

Indexing and Upgradation While Magento 2.4.3 Installation Steps

Now when all the commands run correctly, you will need to resize the image,

clear the face after running the command

php bin/magento cache:flush

then run the command below to resize the image,

php bin/magento catalog:images:resize

Now open your store in browser.

Fronend Magento Loading

 

Solution of Magento 2.4.3 Admin Login Issue

Failed to send the message please contact the administrator.

You need to configure two-factor authorization in order to proceed with your store admin.

Admin Login Two Factor Issue While Magento 2.4.3 Installation

Now Resolve Magento 2 Login Issue After fresh installation of Magento 2.4.3 via the following command line.

php bin/magento module:disable Magento_TwoFactorAuth

All the upcoming versions of Magento 24 have been made more secure. Inside this security is the step-to-step verification.

Disable 2 Factor Authentication

Now open your admin URL, the issue has been resolved successfully.

Admin Login Issue Resolve

As soon as you go to the bottommost section of the dashboard, you will see on the right side corner that Magento is 2.4.1-p1 version.

Admin Mageno 2.4.3p1

 

Conclusion

Magento 2.4.3 version is a bit complicated for those who are not very technically aware.

Although the installation has been removed from it through the graphical user interface, due to this also it has become a bit more complicated.

But still, you can install Magento 2.4 version successfully using the XAMPP server on the Windows operating system.

 

Recommended Post:

Magento 2.4 Installation Guide: How to Install Magento 2.4.2

Page Builder Editor: How to Change Editor in Magento 2