I am new to Magento. I have read the requirements for Magento. I dont have a linux box and I have to make do with my Windows one.

I am trying to install Magento 2.3 with sample data on XAMPP 7.3 by following https://www.mageplaza.com/devdocs/how-install-magento-2-windows.html.

I completed the installation. However when i hit localhost/magento (i have named the dir as magento in htdocs), it doesnt load the static assets like iamges, js, fonts. So i get almost an empty page

When i inspected the page(in chrome browser) and i noticed that static assets were not going loaded as most of the fonts, js etc were not there in pub/static dir.

I tried running magento setup:static-content:deploy -f to deploy the static files.

However there is no improvement and the page is empty (http://localhost/magento).

I am grateful for any help in resolving this issue.


Localhost Magento page


1 Answer 1


This is Magento bug. Wrong paths to Windows are generated. The fixed fix is

Magento 2.3.0 - 2.3.3


the string

if (0 === strpos($realPath, $directory)) {
    return true;

to replace

$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
   return true;

If You can't find out the (/vendor/magento/framework/) folder in magento 2.2.7 - 2.3.3 . Then You can check it here:


And your other magento version check this link :-


After change your run command :-

php bin/magento c:c
php bin/magento c:f

Hope this help you

Thanks ...

  • Hello @IT guy check more link --- magento.stackexchange.com/a/269111/85907 Commented Jun 27, 2020 at 12:30
  • Thanks a lot. I will check
    – IT guy
    Commented Jun 28, 2020 at 16:51
  • I followed your suggestion to replace the code at /vendor/magento/framework/View/Element/Template/File/Validator.php:140. It worked !! Thanks. I have marked the response accordingly
    – IT guy
    Commented Jun 28, 2020 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.