An open laptop on a wooden desk in a dimly lit home office, beside a notebook and a mug, with a plant by the window and lit shelves behind

Laravel Herd Windows Setup: Install, First Site and PHP Versions

A Laravel Herd Windows setup takes four steps: download the installer, run it with administrator rights, open Herd once so it can download PHP and Node.js, then create a site in the Herd folder in your user profile. Herd runs natively on Windows 10 or later, so you do not need WSL or Docker. This guide is for beginners who want to start with Laravel on their own Windows PC. It also covers the parts most guides skip: running Herd next to Laragon or XAMPP, and what to check when a .test site will not load.

I work as a PHP and Laravel developer; it is my day job. I develop PHP on Windows 11 using Laragon, so this guide pays particular attention to how Herd fits on a machine that already has another PHP stack. The install steps and commands below come from Herd’s own Windows documentation and the Laravel documentation, linked as they come up and listed at the end. They are not a record of a single install session. If you have never set up PHP locally before, the beginner guide to a local PHP development environment on Windows explains what a local stack is and why you want one.

What Herd puts on your PC, and what it leaves out

Herd is a desktop app from the Laravel team that bundles a web server and the command-line tools Laravel needs. According to the Herd installation page, it ships with PHP, nginx and Node.js. The Laravel installation docs list the command-line tools you get: php, composer, laravel, expose, node, npm and nvm.

The free version does not include a database server. That matters more than it sounds, because it is the main practical difference from the older all-in-one stacks: Laragon includes MySQL, and XAMPP includes MariaDB.

You wantFree HerdNotes
PHP, with several versions side by sideYesThe latest stable PHP by default, currently 8.5 per Herd’s docs
A web server and .test domainsYesnginx, with the HerdHelper service writing your hosts file
Composer and the Laravel installerYesAvailable in any terminal once Herd is installed
Node.js and npmYesManaged through nvm
SQLiteYesNew Laravel apps use SQLite by default, so no database server is needed to start
MySQL, PostgreSQL, RedisNoHerd Pro (a paid licence), DBngin, or the vendor’s own installer

Herd’s databases page confirms this split. Herd ships the PHP extensions for MySQL, MariaDB, PostgreSQL, MongoDB, Redis and SQLite, but the database services themselves come from Herd Pro or from somewhere else. For a first Laravel app, SQLite is enough.

Before you install: free up ports 80 and 443

Herd’s web server needs ports 80 and 443. Herd’s nginx troubleshooting page gives this as the most common reason nginx does not start: another program, such as IIS or Apache, is already using one of those ports. If you have XAMPP or Laragon running a web server, stop it first.

To see what is listening, open PowerShell and run:

netstat -aon | findstr :80
netstat -aon | findstr :443

The last number on each line is a process ID. If something other than Herd is listening on port 80 or 443, look that PID up in Task Manager to see which program it is. No output means the port is free.

Laravel Herd Windows setup, step by step

The Laravel Herd Windows setup itself is short. Herd needs administrator rights during installation, because the installer adds a Windows service called HerdHelper. That service updates your hosts file so that names like my-app.test point to your own machine.

  1. Download the Windows installer from the Herd for Windows page.
  2. Run the installer and accept the Windows User Account Control prompt. Herd’s docs say the installer must run with admin permissions so it can add the HerdHelper service.
  3. When the installer finishes, open Herd. This starts onboarding, which downloads the latest PHP and Node.js versions and asks whether Herd should launch when you log in to Windows.
  4. Onboarding also offers to connect an AI provider for Herd Studio. That is optional. You can skip it and connect one later in the settings.
  5. When onboarding finishes, Herd opens its Applications window. You can create your first app from there or from the terminal.

Herd keeps running in the system tray. According to the Laravel docs, a left-click on the tray icon opens the Herd window and a right-click opens a quick menu.

Check that the command-line tools work

Open a new PowerShell window. A window that was already open before the install will not see the updated PATH. Then run the checks that Herd’s installation page lists:

herd --version
php --version
laravel --version
composer --version
node --version

Each command should print a version number. If you get 'herd' is not recognized as an internal or external command, see the PATH fix in the troubleshooting section below.

Create your first Laravel site in the Herd folder

During installation Herd creates a folder at %USERPROFILE%\Herd, which is usually C:\Users\YourName\Herd, and parks it. Parking means every project folder inside it is served automatically at http://folder-name.test. You do not need to set up virtual hosts.

From PowerShell, these are the commands from Herd’s applications guide:

Set-Location -Path "$env:USERPROFILE\Herd"
laravel new my-project
cd my-project
herd open

laravel new creates the project and may ask you some setup questions. If you are not sure, leave the database as SQLite. The Laravel docs say a new application’s .env file points at SQLite by default and that the installer creates database/database.sqlite for you. herd open then opens http://my-project.test in your browser.

If you prefer the GUI, choose “New Application” from the Herd tray menu, or press Ctrl+N in the Applications window. Enter a name, pick a starter kit (No Starter Kit, React, Vue, Svelte or Livewire) and click “Create App”. Herd’s docs note that while the prompt box stays empty, Herd only runs the Laravel installer and no AI is involved.

Serving a project that lives somewhere else

If your projects already live in another folder, you have two options. To serve every project in a folder, park it:

herd park C:\Users\YourName\Code

To serve a single project, go into its folder and link it. The domain comes from the folder name unless you give one:

herd link
herd link custom-name

herd links lists linked sites and herd parked lists sites in parked folders. Both are covered in the Herd command-line reference.

Switch PHP versions globally or for one site

This is where Herd is most useful. Herd has one global PHP version and lets you pin, or isolate, individual sites to a different one. Laravel’s release notes list Laravel 13 as supporting PHP 8.3 to 8.5 and Laravel 12 as supporting 8.2 to 8.5. An older project may still need an older PHP than the one Herd installs by default.

Everything below is from Herd’s PHP versions page:

  1. See what is installed: herd php:list. The global version has an asterisk next to it.
  2. Install another version, for example herd php:install 8.3. You can also do this from the “PHP” tab in Herd’s settings.
  3. Change the global version with herd use 8.3, or pick it from the Herd tray menu.
  4. To pin one site instead, go into that site’s folder and run herd isolate 8.3. In the GUI, select the site in the Applications window and choose the PHP version under “Environment” in the inspector on the right.
  5. Run herd isolated to see which sites are pinned, and herd unisolate in a site’s folder to return it to the global version.

There is a catch with isolated sites. The browser gets the pinned version, but a plain php or composer command in the terminal still uses the global one. Herd provides proxy commands that respect the pin:

herd php artisan migrate
herd composer install
herd which-php

If composer install complains about the PHP version in a project you have isolated, run it again as herd composer install.

Each PHP version also has its own php.ini, opened with herd ini. Herd’s PHP settings page notes that browser requests only pick up changes after herd restart.

Where Herd keeps things

Herd spreads its files across several folders, which is confusing when you go looking for a log or a config file. These locations are from the Herd directories and files page:

WhatWhere
Your sites (default parked folder)%USERPROFILE%\Herd
The Herd applicationC:\Program Files\Herd
Herd’s main config folder%USERPROFILE%\.config\herd
PHP, Composer and other binaries%USERPROFILE%\.config\herd\bin
nginx and php-fpm logs%USERPROFILE%\.config\herd\Log
Site-specific nginx configs%USERPROFILE%\.config\herd\config\valet\Nginx
The Herd app’s own log%USERPROFILE%\AppData\Roaming\Herd\logs

Running Herd next to Laragon or XAMPP

You can keep Laragon or XAMPP installed while you try Herd. Herd’s installation page says Herd does not alter other services on your system. Three things need care.

Ports. Only one web server can use port 80 at a time. Stop the other stack’s web server before starting Herd, or the “nginx does not start” problem described above will appear.

Which php your terminal finds. Windows runs the first php.exe it finds on your PATH. If Laragon or XAMPP added its own PHP folder to PATH, typing php might run that one instead of Herd’s. The built-in where command searches the PATH and shows every match in order:

where.exe php
where.exe composer

The first line is the copy that runs. Herd’s binaries live under .config\herd\bin. If another stack’s folder is listed first, either move Herd’s entry above it in your user PATH or use herd php and herd composer, which always use Herd’s PHP.

Domains. Herd and Laragon both generate .test names; Laragon’s site describes its automatic virtual hosts producing names like app.test. Herd writes its entries between # Herd generated Hosts markers in C:\Windows\System32\drivers\etc\hosts. If two stacks claim the same name, the browser goes wherever that file and the running web server send it. Use different project names in each.

Which should a beginner keep? It depends on the project. Herd is the simpler choice if you are only writing Laravel, because the Laravel installer, per-site PHP versions and .test domains are ready as soon as it is installed. Laragon is the simpler choice if your projects need MySQL, because it includes a database server and Herd’s free version does not. The Laragon vs XAMPP comparison covers the other two options in more detail.

What commonly goes wrong on Windows, and how to tell

Each problem below is listed with the symptom you will see first. The fixes come from Herd’s common issues page and the troubleshooting pages linked from it.

“herd is not recognized” in the terminal

Herd’s bin folder is missing from your PATH. Check with:

$env:PATH -split ';' | Where-Object { $_ -like '*herd*' }

If this prints nothing, press Win+R, type sysdm.cpl and open Advanced > Environment Variables. Under User variables, edit Path and add %USERPROFILE%\.config\herd\bin. Then open a new terminal. If that folder does not exist, Herd’s PATH page says reinstalling Herd recreates it.

The .test address does not load at all

Open your hosts file in Notepad. If there is no # Herd generated Hosts block, the HerdHelper service is not writing to it. In an elevated PowerShell (Run as administrator), check the service and start it:

sc.exe query HerdHelper
sc.exe start HerdHelper

Herd’s HerdHelper page mentions antivirus software locking the hosts file and the file being read-only as common causes. If the service is not installed at all, running the Herd installer again puts it back.

Herd shows its own 404 page

Herd could not match the folder to a site. A common cause is a folder name that starts with www.. Herd strips that part, so www.my-site.com will not work. Rename the folder to my-site.com and open http://my-site.com.test.

502 Bad Gateway

nginx is running but something behind it is broken, such as a stale PHP process or a broken config file. Herd’s docs suggest isolating the site to a PHP version, or securing it with HTTPS, because either action regenerates that site’s nginx config. You can switch back afterwards.

Everything works but feels slow

Herd’s installation page says Windows Defender can slow Herd down by scanning its folders. It suggests adding %USERPROFILE%\.config\herd as a folder exclusion under Windows Security > Virus & threat protection > Manage settings > Exclusions. That is a trade-off, because Defender then stops scanning files in that folder. On a work machine, ask whoever manages it first.

When not to use Herd

  • Your project needs MySQL and you do not want to pay. Free Herd works with a MySQL server installed separately, for example through DBngin, which the Laravel docs suggest. If you would rather have the database bundled, Laragon and XAMPP both include one, so there is no second tool to manage.
  • You cannot get administrator rights. The installer needs them for the HerdHelper service. On a locked-down work laptop, that may rule Herd out.
  • You are following a course built on XAMPP. Stick with the course’s stack until you finish it. Differences in folder layout and ports are a distraction while you are still learning PHP itself.

Uninstalling is not always the answer either. Herd’s uninstall page says running the installer again repairs an installation without losing data or settings. Try that before removing Herd.

Next step

Once your first Herd site loads, the next useful thing is to make it read and write data. The PHP and MySQL CRUD tutorial covers create, read, update and delete in plain PHP. That makes Laravel’s Eloquent much easier to understand when you meet it. If you have not built anything in PHP yet, start with the first PHP contact form project.

Sources

Leave a Reply

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