Drupal 8 – Css/JavaScript files not loading for new installation

By | December 13, 2017 | 2 Comments
Category: Drupal

If you have installed Drupal 8 on Windows server and noticed the plain html website without Css/JavaScript, here is a way to fix the issue.

  1. Go to plain html website. You will still be able to navigate to the website. Look for Administration > Configuration > Performance link.
  2. Click on this link to open up a page which shows “Bandwidth Optimization” section. Unselect “Aggregate CSS files” and “Aggregate JavaScript files”. Click on “Save Configuration” button.
  3. At this moment, you would get your site with Css and JavaScript but the main problem is not solved yet. So follow the next steps.
  4. Go to DRUPAL_ROOT\sites\default\files folder. Create a folder “tmp” here so the final folder structure looks like DRUPAL_ROOT\sites\default\files\tmp.
  5. Now go back to Administration > Configuration > Development > Performance page
  6. Click on “Clear all caches” button.
  7. Now select “Aggregate CSS files” and “Aggregate JavaScript files”. Click on “Save Configuration” button.
  8. You should have got your Drupal website working with aggregated Css/JavaScript files.

About Vishal Monpara

Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1's and 0's from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.

2 thoughts on “Drupal 8 – Css/JavaScript files not loading for new installation

  1. Graham

    Hi. Problem is my development site (windows10, wamp), the production site (linux) works fine. Clearing the aggregate settings worked fine .. site working with css & script but as soon as I reset the aggregates – no css ! I can live with it but I’d to fix it .. any ideas (production site works fine) (and yes, I did create the tmp folder

  2. Senen Paez

    thanks for your help. does it happen only to d8 installed in windows server? mine is installed in linux, yet the same thing happen, i will try if it will work on linux. thanks for your instruction.

Leave a Reply

Your email address will not be published. Required fields are marked *