# Setting up PHP for Local Development

I am building a new PHP application with [PHP](https://www.php.net/) and [Laravel](https://laravel.com/).

Before, for MacOS, I typically installed PHP with Homebrew. Sometimes, I've even used Docker and things like Laravel Sail, however, those could sometimes have performance issues and there were still tools where I wanted PHP locally.

Recently, Laravel Herd was released to make this process much easier. I will use [Herd](https://herd.laravel.com/) to quickly get started. It is a tool for MacOS to quickly install everything needed to spin up a new Laravel or other PHP-based applications locally.

![Installing Laravel Herd](https://cdn.hashnode.com/res/hashnode/image/upload/v1696377828868/1627a37a-4f9b-40fe-9a65-531cb766655e.png align="left")

If you have used something like Laravel Valet previously, Herd does much of the same, however, it is much faster to set up. Also, since Herd is using static binaries of PHP, it actually provides better performance than the Homebrew installations.

After completing the Herd installation, `php`, `composer`, and `laravel` will be available in your terminal. Any sites you place in the `~/Herd` directory will be available in the browser. This path is configurable and additional paths can be added through the settings.

![Laravel Herd - Services and PHP Versions](https://cdn.hashnode.com/res/hashnode/image/upload/v1696377830627/537f149e-63b7-449d-a836-ef23ada2d171.png align="left")

The settings also allow installing additional versions of PHP and quickly switching between them.

Now that we have Herd setup and PHP, Composer, and Laravel installed I will move on to setting up a Laravel application in a future post.

And thank you to the Laravel team and BeyondCode team for creating an amazing tool!

---

**Continue Learning**

* [Setup a Local Database](https://seankegel.hashnode.dev/set-up-a-local-database)
