Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

docmojoman's avatar

Php issues - how to remove all old and reinstall new

I’m just getting back to development after a long hiatus when I realized that I needed to upgrade my php from 7.1 in order to work with Laravel. I followed the steps found here : Upgrade to PHP 7.4 with Homebrew on Mac - stitcher.io as it seemed the most popular.

I ended up with my cli being updated to [email protected] but my valet was still running 7.1. After attempting to resolve following these (and other) articles (not necessarily listed in order)

Switching between PHP versions when using Homebrew - Andreas Möller

Laravel Valet broken after upgrading to PHP 7.4

macos - How can I easily switch between PHP versions on Mac OSX? - Stack Overflow

Chasing Code | Upgrade the PHP CLI to 7.4 on Mac

Update PHP to 7.4 macOS Catalina with brew - Stack Overflow

Stuck on PHP Version 7.2.15 after using valet use php72 · Issue #728 · laravel/valet · GitHub

Long story short, I have run into problem after problem all of which involve the cli not matching what’s being served in the browser! Currently, my cli returns PHP 7.3.25 (cli) and phpinfo() returns PHP Version 8.0.0. I’ve been at this for 5 days now and I have a project to deliver soon!

Since I don’t really have any existing projects that require my old set up, I’d like to just reset everything and start from scratch! What I’d like to know is what is the best way to do this?

0 likes
4 replies
jlrdw's avatar

Why not start a new fresh install, and copy your controllers, models, views, custom classes, etc over.

And view the what's new in laravel 8 series, it's free.

docmojoman's avatar

Yes, that's what I'm asking – exactly how do I do a fresh install?

jlrdw's avatar

The docs say:

composer create-project --prefer-dist laravel/laravel blog

But I go here: https://github.com/laravel/laravel/tags

Extract the zip in correct folder, then run composer install, I've never had problems doing it that way.

But do a composer selfuptate and composer clearcache first.

As far as php, just uninstall all of it and do a new install, probably easier.

Do everything, fresh MySql and Apache if needed.

Also see https://stackoverflow.com/questions/41872645/updating-php-version-on-mac

Please or to participate in this conversation.