
5 minutes read
Laravel Herd: the simplest way to install PHP on macOS and Windows
Table of contents
- → Introduction
- → Install Laravel Herd on macOS
- → Install Laravel Herd on Windows
- → Supported PHP versions
- → Included PHP extensions
- → The strengths of Laravel Herd compared to Valet
- → The limitations of Laravel Herd compared to Valet
- → Herd Pro: features and pricing
- → Switch PHP versions per project
- → Herd vs Valet vs Sail
- → Troubleshooting basics
- → Platform availability
- → Conclusion
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
- Download Herd from the official site.
- Open the disk image and drag the app to your Applications folder.
- 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
- Download Herd for Windows.
- Run the installer, then open Herd and follow the prompts.
- 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:
- Discover useful Laravel packages to enhance your PHP projects in 2024
- Compare installation simplicity and performance differences between Herd and Valet
- Explore Laravel version upgrade guides complementary to development environment setup
- Get a step-by-step guide on installing Laravel on macOS like Herd supports
- Learn best practices to secure Laravel apps on local and production environments
- Stay updated on next PHP versions relevant to Herd's supported PHP 8.x
- Prepare for future PHP releases beyond Herd's support with PHP 9 insights
- Improve your Laravel development workflow using Artisan's powerful command tool
- Explore efficient caching strategies ideal for local Laravel development environments
0 comments