Menü schliessen
Created: May 23rd 2025
Last updated: May 26th 2025
Categories: Common Web Development,  IT Development,  Laravel,  Php
Author: Tim Fürer

Laravel Sail: Slow on Windows

Tags:  github,  guide,  Laravel,  laravel sail,  Linux,  VSCode,  web,  Windows,  wsl
Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

Are you on Windows, running Laravel on Docker through Sail and are experiencing long page loads or bad performance in general? If you've installed Laravel to your Windows file system (NTFS) rather than directly to the WSL 2 file system, that's the probable cause.


The Fix

The fix is quite easy, just install or move your Laravel project into the WSL file system. You can navigate there by entering the path "\\wsl$" into the address bar of the Windows Explorer. There, you'll find your installed Linux distributions. A decent place to put your project is in your distribution's "/home" directory. You should also install PHP, Composer, npm/bun, etc. on WSL to directly run them from within the virtual machine.

Use the following command to install PHP, Composer, and the Laravel Installer on WSL (credit: php.new):

/bin/bash -c "$(curl -fsSL https://php.new/install/linux)"

Use the following command to install bun on WSL (credit: bun.sh):

curl -fsSL https://bun.sh/install | bash

If you're using GitHub Desktop for managing your repository or VSCode to edit it, they may prompt you for permission before connecting to the WSL file system, which you should allow.