Magento 2.x Does Not Support Windows & Mac?

Magento 2.3.1 Does Not Support Windows & Mac

Hello Friends, today we will see that how to install Magento 2.3.1 version on localhost using XAMPP.

Don't want to read? Watch Video:

Magento 2 is a more powerful eCommerce platform than Magento 1. I am assuming you are already aware about Magento 2 features as you want to install the Magento 2. However, If you are still interested to know about Magento 2 features, please click here for more details.

Magento 2.x supported only Linux x86-64 Operating systems like Linux distributions, such as RedHat Enterprise Linux (RHEL), CentOS, Ubuntu, Debian, and similar.

Magento 2.x is not supported Windows OS and Mac OS due security reasons however we can still install Magento 2 on Windows machine using XAMPP tool, but we must fix some known errors after installing on Windows system.

Magento 2.3.1 Min System Requirements

Apache: 2.2 or 2.4    / NGiNX 1.x+
PHP: 7.1.3 or later
MySQL: 5.6, 5.7 (Also support MySQL NDB Cluster 7.4.*, MariaDB 10.0, 10.1, 10.2, Percona 5.7 etc.)

Memory Requirement
Min 2 GB RAM recommended

For more details check this

[Optional] Other Setup Requirements to Improve Performance

Varnish Cache, Redis, Rabbit MQ, Solr & elastic

Magento 2 Sources:

1. Composer

  • It is a package manager for PHP
  • Required for developers who want to contribute to the Magento 2 codebase or develop Magento extensions.

2. ZIP File

  • Download from Magento website.

Let’s download latest XAMPP and Magento 2.3.1 from below links.

Download XAMPP:
Download Magento: (You need to signup if you don’t have account)

Step 1: Once you download the above files, first you need to install XAMPP just by some simple clicks (Go with default settings).

Step 2: Now create folder “magento2” inside path “C:\xampp\htdocs” (Assuming you installed XAMPP in C-drive) and extract downloaded Magento zip file content in newly created folder “magento2” (make sure to copy content only from extracted zip file and paste in to magento2 folder)

Step 3: Enable following required PHP extensions in C:\ xampp\php\php.ini

Search above extensions in php.ini and remove starting semi colon (;) from that line to enable it (if already not enabled) and save file.

Step 4: Create virtual host for our website.
Copy and paste host file on desktop from path C:\Windows\System32\drivers\etc\hosts (If you don’t have administrator access on your system otherwise you can directly edit host file from that location)

Now open that host file in any text editor or note pad and add following entry at last & save.

Copy modified host file and paste into this path C:\Windows\System32\drivers\etc\hosts to overwrite changes.

Now open and paste below content in C:\xampp\apache\conf\extra\httpd-vhosts.conf file (Add at last)

    DocumentRoot "C:/xampp/htdocs/magento2"

Step 5: Start Apache and MySql service from XAMPP control panel.

Step 6: Create a new empty database with name “magento2” from PHPMyAdmin

Please note default username will be “root” and password blank.

PHPMyAdmin URL: http://localhost/phpmyadmin/ or (as we have created virtual host)

Step 7: Access this URL ( ) to install and configure Magento 2

Once you execute this URL, it will start checking all the configurations and If there are any errors occurs it will show with red cross symbols. That errors we need to fix before proceeding to the next step. Mostly these errors were related to missing php extensions which we already enabled in previous steps so you may not get these errors.

Simply follow the below steps and install Magento 2 on localhost.

Step A: Run this URL on browser.

Step B: Clicks the next button and complete the installation. See below screenshots.

Step C: Set developer mode

Go to app/etc/ and open env.php and change current application mode by MAGE_MODE' => 'default' to MAGE_MODE' => 'developer'

Then, please flush the cache


Using CLI Commands
>> bin/magento deploy:mode:set developer

Understand Application Modes

There are some more differences available. Please click here for more details.

How to fix known windows system issues:

Error 1. Validator Exception: Invalid template file magento2.3.1 in module

Error Screenshot:


Windows uses "\" as separator, the array "directories" contains entries with "/" as separator, so the check will always fail.

Open file: C:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\Template\File\Validator.php

Replace below code in isPathInDirectories() function:

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path)); // May be line no. 138

Error 2After installation images and Icon missing issue on frontend and admin side

Error Screenshot:


Search and replace keyword "MaterializationStrategy\Symlink" with "MaterializationStrategy\Copy" in file C:\xampp\htdocs\magento2\app\etc\di.xml

General Instructions for Developers:

Set developer mode on development server
Enable error reporting in php.ini
display_errors = On;
error_reporting = E_ALL | E_STRICT;
If UI issue, check error in browser console
Check logs in /var/log/*

Happy Learning !!!! :) Still Doubts? lets put your questions in below comment box! Thanks! 

Please like and subscribe this channel. Your 1 subscription is very important to grow channel!

Magento 2.x Does Not Support Windows & Mac? Magento 2.x Does Not Support Windows & Mac? Reviewed by Web Technology Funda on 3:59:00 AM Rating: 5

No comments

Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!