Laravel Herd: the simplest way to install PHP on your Mac

Laravel Herd: the simplest way to install PHP on your Mac

Modified
Aug 12, 2023
Written by
Benjamin Crozat
0
comments
3 minutes
read

What is Laravel Herd?

Laravel Herd is a free native macOS app that makes it even easier than Laravel Valet to get started with Laravel. It includes everything you need for a local development environment such as PHP, Nginx, and Dnsmasq.

It was introduced at Laracon US in July 19, 2023 and developed by Beyond Code for Laravel LLC.

How to install PHP on your Mac using Laravel Herd

  1. Download Herd on the official website.
  2. Open the Disk Image and drag the application into your /Applications folder.
  3. Launch it and follow the instructions. You can set it up from scratch or import your Laravel Valet configuration.

That’s it. Unlike with Laravel Valet (I wrote about it here), there is no need to install Homebrew (a package manager) and mess with all the dependencies. It just works out of the box.

Make sure everything works by running the following commands:

php --version
laravel --version
composer --version

What PHP versions does Laravel Herd support?

Laravel Herd supports the following versions of PHP:

  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
  • PHP 8.2
  • PHP 8.3

Which PHP extensions are included?

Laravel Herd includes the following PHP extensions:

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

The strengths of Laravel Herd compared to Valet

  • Everything is bundled together. I thought Laravel Valet was simple, but Herd is even simpler.
  • The PHP binaries embedded in Laravel Herd are compiled to run super fast on your Apple silicon Mac. So you will have a significant performance boost.

The limitations of Laravel Herd compared to Valet

Using Laravel Herd, you will encounter some limitations, and this is where you will want to switch to Laravel Valet.

  • You cannot install PHP versions before PHP 7.4.
  • Although Herd included many, you cannot add PHP extensions.

Will there be a Windows or Linux version?

According to the developer, there isn’t a Windows or Linux version planned and never will.

About Benjamin Crozat
Benjamin Crozat

Hi! I’m from the South of France and I’ve been a self-taught web developer since 2006. When I started learning PHP and JavaScript, PHP 4 was still widely used, Internet Explorer 6 ruled the world, and we used DHTML to add falling snow on websites.

Being able to educate myself for free on the web changed my life for the better. Giving back to the community was a natural direction in my career and I truly enjoy it.

Therefore, I decided to take action:

  1. I launched this blog in September 2022 with the goal to be in everyone’s Google search. I get more than tens of thousands of monthly clicks from it and even more visits overall (my analytics dashboard is public by the way).
  2. I also started growing my X (formerly Twitter) account at the same time, which has now over 7,000 followers.
  3. All the content I write is free thanks to my sponsors.

I also want to be completely free with my time and make a living with my own products. In April 2024, I launched Nobinge, a tool to summarize and chat with your content, including YouTube videos.

Believe me, I’m just getting started!

0 comments

You need to be signed in to comment this post.
Sign in with GitHub