Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ilgenfritz's avatar

Windows local development environment

Hi everyone, i would like to know, how to improve the speed of the local development setup on Windows. We currently use the basic "php artisan serve" command in combination with "npm run dev". We use the lastest version of Laravel, PHP and NPM/Node.js.

Are they any other tools/setup which would be better/faster to use? Would something like Laravel Sail be better?

0 likes
10 replies
LaryAI's avatar
Level 58

Laravel Sail is a great option for local development on Windows. It provides a lightweight Docker environment that can be easily set up and configured. Here are the steps to get started with Laravel Sail:

  1. Install Docker Desktop for Windows: https://www.docker.com/products/docker-desktop

  2. Install Laravel Sail by running the following command in your Laravel project directory:

composer require laravel/sail --dev
  1. Generate the Sail configuration file by running the following command:
php artisan sail:install
  1. Start the Docker containers by running the following command:
./vendor/bin/sail up

This will start the containers and map the necessary ports to your local machine. You can then access your Laravel application at http://localhost.

Using Laravel Sail can significantly improve the speed and reliability of your local development environment on Windows.

Snapey's avatar

where do you see slowness? You have not mentioned your database for instance?

1 like
ilgenfritz's avatar

@Snapey I would say almost everything. We are using a local installed MariaDB 10.6 as a Windows Service. When starting our local setup with "php artisan serve" and "npm run dev" it takes almost 30 seconds to show the Index page of our application.

Our SQL queries are highly optimized and are taking max 300-400ms to execute on the first load before caching.

Snapey's avatar

@ilgenfritz I would say your problems are possibly related to networking (eg DNS), delays of that duration are likely to be network timeout related. I doubt sail or wamp etc would make much difference.

When you run an artisan command, I assume the response is immediate?

Check for any difference with the Windows machine on and off-line.

I assume you are opening your webpages with localhost or 127.0.0.1 ?

1 like
ilgenfritz's avatar

@Snapey Yes, artisan commands are instant. Opening webpages by "127.0.0.1:8000". I can see that our "app.scss"-file takes the most time to load by starting the "npm run dev" command.

It makes no difference when i'm online or offline.

dacfabre's avatar

@ilgenfritz if its app.scss i believe you are compiling everything on a single file, and also import all modules of a package.

you might want to do a research on tree shaking. and if you are using webpack read code splitting

in vitejs i believe it automatically chuck js and css

1 like
dacfabre's avatar

@ilgenfritz probably unlikely, but can you check on your developer tools(f12) under network if it is throttled.

throttling is used for testing performance. you might forgot to turn it off

1 like
newbie360's avatar

@dacfabre same here , sometimes after i testing the progress bar, i always forgot turn it off ;)

1 like
jlrdw's avatar

@ilgenfritz on windows 10 with 16 GB memory and my custom stack it very fast.

Custom stack:

  • Apache
  • PHP
  • MySql

All zip version extracted and setup per their documentation. I have another test stack but use Nginx, also fast.

1 like

Please or to participate in this conversation.