Trying Drupal 9.3.15 on Ubuntu on Windows Subsystem for Linux (WSL). However it’s very slow when browsing to http://localhost/drupal9 and it timeout most of the times, what could be the reason behind this slowness?
- Created directory for Drupal:
mkdir ~/projects/drupal9 - Download Drupal using composer:
composer create-project drupal/recommended-project ~/projects/drupal9 - Link my new project to
/var/www/drupal9:sudo ln -sT ~/projects/drupal9/web /var/www/drupal9 - Install Drupal using drush:
drush site:install - Configure nginx:
server { listen 80 default_server; root /var/www; index index.php; location /drupal9 { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^ /drupal9/index.php; } location ~ '.php$|^/update.php' { fastcgi_split_path_info ^(.+?.php)(|/.*)$; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param QUERY_STRING $query_string; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; }