Moving away from Laravel Valet

A long time ago, I set up Laravel Valet to use a multipurpose local dev environment for WordPress, Laravel, and any other static files.

Fast forward to nearly four years after, I am removing it because I have better use of my time with DevKinsta and using Sail if I ever want to go down the Laravel.

First things first:

Update all the things with brew. I use brewup:

 brewup 
Updated 2 taps (roots/tap and homebrew/services).
==> Outdated Formulae
trellis-cli

You have 1 outdated formula installed.
You can upgrade it with brew upgrade
or list it with brew outdated.
==> Upgrading 1 outdated package:
roots/tap/trellis-cli 1.10.0 -> 1.10.1
==> Fetching roots/tap/trellis-cli
==> Downloading https://github.com/roots/trellis-cli/releases/download/v1.10.1/trellis_Darwin_x86_64.tar.g
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/16435232
######################################################################## 100.0%
==> Upgrading roots/tap/trellis-cli
  1.10.0 -> 1.10.1 

🍺  /usr/local/Cellar/trellis-cli/1.10.1: 5 files, 14.5MB, built in 3 seconds
==> Running `brew cleanup trellis-cli`...

Ah, a hanging trellis-cli – removing it per their documentation.

Update composer

To keep things fresh and up-to-date,

composer global update

Uninstall Valet

Valet is fast and lightweight when you compare it to Docker-based alternatives, but WordPress development tools have kept improving, and I no longer want to manage a local webserver from my machine host. I prefer a containerized webserver that I can delete at any time. So it’s time to go, Valet:

valet uninstall --force 
Password:
YOU ARE ABOUT TO UNINSTALL Nginx, PHP, Dnsmasq and all Valet configs and logs.
Are you sure you want to proceed? yes
Removing certificates for all Secured sites...
Attempting to unsecure the following sites:

True to its words, it removed the formulas:

brew info php 
==> php: stable 8.2.3 (bottled), HEAD
General-purpose scripting language
https://www.php.net/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb
License: PHP-3.01

Re-installing PHP locally, I run into this error:

brew install php 
Error: No such file or directory - /usr/local/var/homebrew/linked/php

A quick search pointed to the earlier uninstallation of Valet: https://stackoverflow.com/a/74323616

I also see that PHP is missing:

brew missing 
composer: php
wp-cli: php

That prompted a fresh PHP installation:

brew install php

DevKinsta

I installed DevKinsta, well because they have made significant improvements to the tool. I preferred it to Local because it was a little bit similar to VIP Local Development Environment, which I use for work, plus both are powered by Docker.

You can head over to DevKinsta‘s download page to give it a spin!

Other alternatives:

It is worth adding that I recently tested Local, and I wasn’t able to open shell with the default Terminal app due to this error:

“912I3l9-1.sh” can’t be opened because (null) is not allowed to open documents in Terminal.

The Local team is aware and is waiting for Apple to fix the issue with the Terminal app.

If you want something snappy for a quick test, you can also use @wordpress/env.

FEATURED IMAGE by Iewek Gnos on Unsplash


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *