3

I have installed vanilla (with sample data) Magento Community edition 2.4.2 on Mac OS with following technology stack however styles are not loaded at all, not even in head block. However I can see all CSS files in pub/static folder when content is deployed. As it can be seen in attached screenshot, there are NO errors in browser console as well.

enter image description here

Web server: Nginx

PHP: 7.4 with fpm

Elastic Search: v7

Mysql: 5.7.32 (Here I agree that on Magento's site Mysql 8 is recommended but with same version on linux, it works as expected.)

Rizwan Dhuka
  • 775
  • 7
  • 18

3 Answers3

2

You can try this if you have configured nginx correctly:

If you use php 7.4.20

Edit that php.ini file and find the section [Pcre] and add this line at the bottom of that section :

pcre.jit=0

Restart your PHP

see : Magento doesn't include theme.css in html

Pascal LE MINH
  • 301
  • 1
  • 2
0

Make sure you are serving the requests from the <magento_root>/pub folder at webserver level.

Diana
  • 5,137
  • 1
  • 11
  • 26
  • Thanks Diana for your response. Considering https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html#a-note-about-nginx, I am already using 'nginx.conf.sample' in Nginx server block which changes root to <magento_root>/pub. However I tried with approach that you suggested which gives 404. Any more detail around it would be helpful. – Rizwan Dhuka Jun 14 '21 at 08:22
  • hi there, check this thread, maybe you will find something useful in there https://magento.stackexchange.com/questions/332400/frontend-and-admin-not-working-magento-2-4-2-upgrade – Diana Jun 14 '21 at 09:33
0

Within this URL - https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html - under the Operating Systems section - this is shared for your consideration. "Magento is not supported on Microsoft Windows and macOS."

Wilson Hauck
  • 310
  • 1
  • 7