Benjamin Crozat “Heard about Sevalla? They let you deploy PHP apps with ease.” Claim $50 →

Laravel Herd: the simplest way to install PHP on macOS and Windows

5 minutes read

Laravel Herd: the simplest way to install PHP on macOS and Windows

Introduction

Laravel Herd is a free, native app for local PHP development. It runs on macOS and Windows. It bundles PHP, nginx, dnsmasq, and nvm for managing Node.js. Herd was introduced at Laracon US on July 19, 2023 and developed by Beyond Code GmbH for the Laravel team. If you prefer a Homebrew workflow, I also wrote about Laravel Valet.

Install Laravel Herd on macOS

Requirements

  • macOS 12 or later

Steps

  1. Download Herd from the official site.
  2. Open the disk image and drag the app to your Applications folder.
  3. Launch Herd and follow the setup. You can start fresh or import your Laravel Valet sites.

Herd includes nvm, so it can install and switch Node.js versions for you.

Verify your setup

Run these commands in Terminal:

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

Install Laravel Herd on Windows

Requirements

  • Windows 10 or later

Steps

  1. Download Herd for Windows.
  2. Run the installer, then open Herd and follow the prompts.
  3. For details, see the Herd for Windows install docs.

Verify your setup

Run these commands in PowerShell:

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

Supported PHP versions

Herd supports PHP 7.4, 8.0, 8.1, 8.2, 8.3, and 8.4. New installs default to PHP 8.4 since January 10, 2025. See the supported PHP versions and the macOS updates page for details.

Included PHP extensions

Herd includes many extensions out of the box, including:

  • bcmath
  • bz2
  • calendar
  • ctype
  • curl
  • dba
  • dom
  • exif
  • ffi
  • fileinfo
  • filter
  • ftp
  • gd
  • gmp
  • iconv
  • igbinary
  • imagick
  • imap
  • intl
  • ldap
  • lz4
  • mbstring
  • mongodb
  • mysqli
  • opcache
  • openssl
  • pcntl
  • pdo
  • pdo_mysql
  • pdo_pgsql
  • pdo_sqlite
  • pdo_sqlsrv
  • pgsql
  • phar
  • posix
  • readline
  • redis
  • session
  • shmop
  • simplexml
  • soap
  • sockets
  • sodium
  • sqlite3
  • sqlsrv
  • sysvmsg
  • sysvsem
  • sysvshm
  • tokenizer
  • xml
  • xmlreader
  • xmlwriter
  • xsl
  • zip
  • zlib

Availability can vary by OS. For the full, always‑current list, see the official page on included PHP extensions.

How to add extensions

Although Herd includes many extensions, you can add more.

  • On macOS: use Homebrew or PECL, then enable the extension and restart Herd. For example:
pecl install xdebug
# then enable it in your php.ini if needed
herd restart
  • On Windows: download the matching DLL for your PHP version, place it in the ext folder, enable it in php.ini (for example, extension=php_intl.dll), then restart Herd.

See the step‑by‑step guide in the PHP extensions docs.

The strengths of Laravel Herd compared to Valet

  • Everything you need is bundled. I thought Valet was simple, but Herd is even simpler for a quick start.
  • No Homebrew or Docker required for the core setup.
  • The team says your tests and web requests run faster with Herd. See the claim on the Herd site.

The limitations of Laravel Herd compared to Valet

Using Herd, you may hit these limits:

  • You cannot install PHP versions before 7.4.
  • Herd does not include every extension by default, but you can add more. See How to add extensions above.

Herd Pro: features and pricing

Herd Basic is free. Herd Pro costs $99 for a one‑year license, and you can activate it on two devices. A teams option is available. Learn more on the Herd Pro page.

Herd Pro adds:

  • Mail viewer
  • Dumps inspector
  • Log viewer
  • Services: MySQL, MariaDB, PostgreSQL, Redis, Typesense, Meilisearch, MinIO, Laravel Reverb
  • Xdebug detection and helpers

Switch PHP versions per project

Use Herd to switch globally or per project:

# set the global default
herd use 8.4

# in a project folder, pin a version
cd ~/Sites/my-app
herd isolate 8.1

# remove the pin
herd unisolate

See the full guide on managing PHP versions.

Herd vs Valet vs Sail

  • Choose Herd if you want zero dependencies, a simple GUI, and optional Pro services.
  • Choose Valet if you like the Homebrew workflow and a lightweight nginx setup. See the Valet docs and my Valet guide.
  • Choose Sail if you want Docker containers that mirror production and need many services.

Troubleshooting basics

  • Restart services from the Herd menu, or run:
herd restart
  • On macOS, use the menu option Force stop all if something is stuck, then start again.

Platform availability

Herd is available on macOS and Windows. A Linux version is not planned currently. Get the Windows build on the Herd for Windows page.

Conclusion

If you need to install PHP on macOS or Windows fast, Herd is the easiest way. I suggest starting with the free Basic edition, then adding Pro if you want built‑in services and debugging tools. Next steps: download Herd, read the Windows install docs, and check the PHP versions and extensions pages.


Did you like this article? Then, keep learning:

Help me reach more people by sharing this article on social media!

0 comments

Guest

Markdown is supported.

Hey, you need to sign in with your GitHub account to comment. Get started →

Great tools for developers

Search for posts and links

Try to type something…