EU Cookie Consent

To use this Website we are using Cookies and collecting some Data. To be compliant with the EU GDPR we give you to choose if you allow us to use certain Cookies and to collect some Data.

Essential Data

The Essential Data is needed to run the Site you are visiting technically. You can not deactivate them.

Homestead

Valet vs. Homestead – php development on macOS

Daniel Verner -

There are two popular ways to set up Laravel/PHP development environment on macOS: Valet and Homestead. Both are good for development, but their approach is different. Valet is a minimalistic, fast development environment, but Homestead offers a full vagrant virtual machine – with all its advantages and disadvantages. Let’s dive into the strengths and weaknesses of both.

Valet
Good
  • Easy to set up
  • Fast – it is basically just Nginx with dnsmasq
  • No configuration is necessary when you add a new project, just create a folder in your the webroot and you are ready to go
  • It starts automatically with the operating system
  • No need for provisioning/startup/ssh
Bad
  • You have to install all the other necessary services like PHP, MySQL, MongoDB, etc manually, but it is easy to do on mac with Homebrew
  • If you have projects which require different versions of PHP, switching between the PHP versions could be tricky. Update: since Laravel 5.7 it is easy to switch between PHP versions using the valet use php@version command.

Homestead
Good
  • It provides a full Ubuntu virtual machine
  • All necessary services are preinstalled
  • Easy to install other Linux services and binaries if necessary
  • Work on both macOS, Windows, and Linux, and the same development environment can be set up for every team member regardless of os.
Bad
  • It is slow. And sometimes even slower.
  • Every new project requires a new entry in Homestead.yaml and /etc/hosts
  • Npm run dev runs extremely slow in vagrant, so it is better to run it outside, directly on mac, but all PHP commands (e.g. artisan) and composer should run in Homestead, which can be confusing sometimes
  • Setting up debugger requires some more effort compared to Valet (especially for PHP CLI)

Both of these systems work well for PHP development, and as the documentation states, these are intended for different audiences. It depends or your taste and your team’s needs which one suits you better. My choice is Valet.

Tags: Homestead · development · macOS · PHP · Valet

Want products news and updates?

Sign up for our newsletter to stay up to date.

We care about the protection of your data. Read our Privacy Policy.

Impressions from our Team

  • Happy Birthday Ognjen! And marry Christmas to all other 🎄#notacakeshop - #

  • #Office #Garden - #

  • #workhard - #

  • #belgrade #skyline - #

  • #happybirthday Phil :) - #

  • #happybirthday Stefan 🥂 - #

  • #happybirthday Lidija 🍾 - #

  • Say hi 👋 to our newest team member ☕️ - #

  • #bithday #cake 😻 - #

  • #stayathome #homeoffice #42coders - #

  • #stayathome #homeoffice #42coders #starwars :) - #

  • #stayathome #homeoffice #42coders - #

  • We had a really nice time with #laracononline #laravel - #

  • Happy Birthday 🎂 Miloš - #

  • Happy Birthday 🎂Nikola - #

  • #42coders #christmas #dinner what a nice evening :) - #

  • Happy Birthday 🎂 Ognjen - #

  • Wish you all a merry Christmas 🎄🎁 - #

  • #happybirthday Luka! - #

  • https://communian.com Triff dich mit Menschen aus deiner Umgebung die deine Interessen teilen :) Wir sind gerade live gegangen und freuen uns über jede neue Community die zu uns kommt ❤️ - #

© 2021 42coders All rights reserved.