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
- extension=intl
- extension=soap
- extension=sockets
- extension=xsl
- max_execution_time = 900
Check whether the following enabled in xampp\apache\conf\httpd.conf
- LoadModule version_module modules/mod_version.so
After enabling all, restart the apache
Now go to localhost/phpmyadmin
- 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);