cancel
Showing results for 
Search instead for 
Did you mean: 

After installing Magento on windows, I get a blank page

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

After installing Magento on windows, I get a blank page

I have installed Magento 2.3 on windows 10, with xampp. The installation seemed to go OK, but when I navigate to either the admin pages or the frontend pages I get a blank page. Basically the same that this poster https://community.magento.com/t5/Installing-Magento-2-x/magento-2-x-in-windows-via-xampp-problems/m-... is getting.

 

When I open the Developer Tools, I see various errors in the console. One is "Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled." There are also various errors in the file require.js.

 

I have tried all of the following:

  • I've run php bin/magento setup:static-content:deploy -f
    php bin/magento cache:clean
    php bin/magento cache:flush and php bin/magento setup:static-content:deploy el_GR
  • I've added "Header always set X-Content-Type-Options nosniff" to the .htaccess file in the Magento root folder and in the puc/static folder. Then I tried removing "Header always set X-Content-Type-Options nosniff" from these .htaccess files.
  • I've tried developer, default, and production mode. In developer mode, I get the error: "Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp/htdocs/magento_test/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js'"
  • I've tried 3 different browsers. I've tried deleting the browser cookies.
  • My Apache httpd.conf has "AllowOverride All" for the directory "c:\xampp\htdocs". LoadModule rewrite_module modules/mod_rewrite.so is uncommented. I assume this means mod_rewrite is enabled.
  • I can't use chmod, as I'm on windows, but I've used takeown on the folders where writing should be enabled.
  • I tried the advice given here: https://community.magento.com/t5/Installing-Magento-2-x/After-installing-Magento-2-in-Windows-under-...

None of it has worked. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: After installing Magento on windows, I get a blank page

Hello @myrtopyrli9688 

 

Please refer https://meetanshi.com/blog/solved-magento-2-2-7-and-2-3-admin-page-blank-issue/ for the solution.

 

Thank you.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

View solution in original post

4 REPLIES 4

Re: After installing Magento on windows, I get a blank page

Hello @myrtopyrli9688 

 

Please refer https://meetanshi.com/blog/solved-magento-2-2-7-and-2-3-admin-page-blank-issue/ for the solution.

 

Thank you.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: After installing Magento on windows, I get a blank page

That solved it, thanks!

Re: After installing Magento on windows, I get a blank page

What is your solution?

Re: After installing Magento on windows, I get a blank page

I had the same issue when trying to install Magento locally. After trying multiple solutions, I finally resolved it by following the steps in this guide: https://www.affinityreader.com/2024/08/setting-up-magento-2-development.html