What's the simplest way to get multiple PHP8 projects running locally?

I’ve got an old Macbook with an ancient version of XAMPP installed that I cannot uninstall because I still support numerous php5 projects AND it made numerous additions to various dot files and system paths and I tried uninstalling it before and installing php 7 and it was just a nightmare so I rolled back those changes.

I’m thinking a virtual machine with php8 would be the best solution but I know almost nothing about such things.

The latest version of XAMPP for OSX is actually a virtual machine but it seems your project files have to be stored directly within the VM disk. There doesn’t seem to be a way to have a native folder contain my projects (so Time Machine and Google Drive can back them up) while also having the XAMPP VM access the files from that native location.

Also it seems using the XAMPP VM requires using localhost and a different port number to access each project. In my old setup I have a unique local domain name setup in the hosts file for each project and actual code in the projects relies on these domain names and won’t work with localhost:5678

I tried the laravel homestead virtual machine like 2 years ago and some of the simpler projects I tried to port to php7 relied on some Apache .htaccess settings (and the live servers these projects live on also use apache) but I had major headaches getting Apache working on Laravel Homestead.

Can anyone give me a good solution for getting a dev environment setup for porting ancient PHP5/Apache projects into PHP8/Apache?

From what I’ve read on this and other forumns, there is no easy solution to port from php5 to php8. I wish you much luck and (Hopefully) success.

Most of my code is simple and probably won’t be hard to port. My problem is getting an environment running PHP8 in the first place.

Have you thought about using docker? You can use it to run any PHP version you want for each app?

Sponsor our Newsletter | Privacy Policy | Terms of Service