I've just finished installing the latest stable release of Drupal by following the steps at https://www.drupal.org/docs/user_guide/en/install-run.html.  After the last step, when I tried to access my Drupal site, it looks crappy. Firefox debugger shows that it is not able to find the directories sites/default/files/js and sites/default/files/css. I looked at my directory C:\drupal\web\sites\default\files and sure enough, there are no "css" nor "js" folders under there.

Second issue: When I click on any of the links under "Administration menu" (for example, the links for "Content", "Extend", "Configuration", etc.) on my weird looking site, it returns a 404 error (not found).

Info:

  • Using Apache 2.4.62 on Windows 10.
  • PHP 8.3.14
  • Downloaded Drupal using Composer (no errors from Composer)
    • Command executed: composer create-project drupal/recommended-project drupal

I've searched on these issues but did not see anything that solved my issues (I'm very new to Drupal so the issues are due to my lack of understanding .. I'm sure).

Thanks for any help/suggestion!

Comments

daoductrung’s picture

The css and JS folder comes only when you enable Aggregate css and js in Performance.
Regarding the 404 issue. Try to see if your web server has agreed to Drupal's redirect method.

ikam’s picture

I added the Apache Rewrite directives and now I can see the CSS and JS folders. The website looks good now. Thank you!

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]