Skip to main content

How To Install Magento2 on Xampp

Image
How To Install Magento2 on Xampp

How To Install Magento2 on Xampp

Download Magento2 latest version from Magento2 official Website

extract downloaded files to xampp/htdocs/magento2

Before installation check whether the following extensions are enabled in php.ini

  1. extension=intl
  2. extension=soap
  3. extension=sockets
  4. extension=xsl
  5. max_execution_time = 900

Check whether the following enabled in xampp\apache\conf\httpd.conf

  1. LoadModule version_module modules/mod_version.so

After enabling all, restart the apache

Now go to localhost/phpmyadmin

  1. create a database for magento2

Fixes For the Issue “Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:" in Widows Environments

In

\vendor\magento\framework\View\Element\Template\File\Validator.php

in

function isPathInDirectories()

replace

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

with:

a) PHP >= 7.2:

if (PHP_OS_FAMILY === 'Windows')

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

else

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

b) PHP

if (strtolower(substr(PHP_OS, 0, 3)) === 'win')

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

else

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