'Drupal Installation Default Page not loading css

I recently installed Drupal on Windows Server I had no errors on installation. There was a warning for OPCaching. I also don't think it should affect it but I used SQLite.

After installation the default page loaded with no CSS. Does anyone know why this happened or how to fix it?

enter image description here



Solution 1:[1]

I found the solution on another site, check the link attached.

"You have enabled CSS compression through admin > Settings > Performance, so the compressed CSS file is creating at sites/default/files/CSS directory and the same file is loading.

If you disable the CSS compression, you can see all the CSS files from the drupal core, contributed modules and theme.

The CSS compressor will combine all the CSS files from the drupal core, contributed modules and themes and create a compressed file in sites/default/files/CSS.

When you are developing, disable the CSS compression, when you deploy on a production server, enable CSS compression."

https://www.quora.com/Why-is-the-Drupal-site-not-loading-CSS

Solution 2:[2]

In a clean installation, or even in case you cannot finish it due to the lack of CSS from the install.php page itself, check that wrong files/folders permissions are not preventing Drupal from reading folder "sites" content. Even a mistake you typed while editing the settings.php file could cause this.

If the issue persists once checked your permissions and cleared the cache in your browser (you can try on another browser to be sure), you can do this: rename your current settings.php file to settings.php.old, copy sites/default/default.settings.php to sites/default/settings.php and customize your database connection info. If it solves the issue, then check any differences between settings.php and settings.php.old and apply the proper corrections to your old settings file.

Solution 3:[3]

I faced the same issue with Drupal 9. To resolve this I followed below steps:

  1. Navigate to /admin/config/development/performance in your browser.
  2. Under BANDWIDTH OPTIMIZATION, Uncheck Aggregate CSS files and Aggregate JavaScript files checkboxes.
  3. Click on Save configuration.

This way the default/enabled theme will be loaded. I Hope this will help !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Manuel Garcia
Solution 3 Rahul Chauhan