
Ask HN: What's your PHP development environment setup? - leeshire
I got a Lenovo IdeaPad as a gift S340<p>I&#x27;m wondering if it&#x27;s wroth installing Linux Ubuntu on on my Lenovo or just keeping my Windows 10 and learn PHP on windows?<p>What would you recommend? what are some of your setups so I can get some ideas.<p>It seems like is hard to install PHP Dev Env on Windows 10 it keeps asking to install redistributable.<p>I think MacBook was the best laptop I had because you can just install MAMP.
======
bhdzllr
You can use docker, so the OS doesn't matter and you don't need to install a
webserver, php, mysql and other things on your main system. Even if you use
Ubuntu as your main system it's good idea to use docker for you local
environment.

If you need a starting point I have a example on GitHub that may help you:
[https://github.com/bhdzllr/localhost/tree/master/docker-
lemp](https://github.com/bhdzllr/localhost/tree/master/docker-lemp)

It's a LEMP stack. You need to change the volumes in the "docker-compose.yaml"
to match to your system and adapt and copy the "nginx/default.conf" into the
volume path of nginx. The "nginx/default.conf" has some examples which you may
delete.

------
smt88
Don't use MAMP.

Use whatever OS you like in terms of UI. If you enjoy MacOS, use it.

Run PHP in a container that matches your servers and has declarative
infrastructure (Docker Compose, Vagrant, Ansible, Pulumi, whatever). All have
boilerplate PHP configs you can download.

Then use PhpStorm. VS Code is free but not even in the ballpark in terms of
static analysis, refactoring, linting, and autocomplete.

------
vincent_s
I use PHP-Storm + Vagrant on Windows 10. There are plenty of pre-packaged
Vagrant Boxes for this use case like VCCW [1] or Homestead [2]. Setup only
takes a few minutes and you can keep your Windows 10 while using Ubuntu to run
your PHP code.

[1] [http://vccw.cc/](http://vccw.cc/) [2]
[https://laravel.com/docs/7.x/homestead](https://laravel.com/docs/7.x/homestead)

------
throwaway888abc
Linux + VS Code + Docker Compose + PHP in container + source mounted

OS: Pop_OS, Regolith, Manjaro, Ubuntu

Invest time in learning Linux basis, you will be positively surprised.

------
Raed667
XAMPP [1] provides a fairly complete dev environment with a basic web sever
and DB. Do this if you find using Docker an overkill for your project.

Bonus point, they have good integrations with AWS and GCP.

[1]
[https://www.apachefriends.org/fr/index.html](https://www.apachefriends.org/fr/index.html)

------
mekster
Don't do weird setup on Windows or Mac locally.

Just get a native Linux through virtualization like VirtualBox or VMware or
WSL (maybe wait for WSL2) and run Ubuntu in it. You'll find it makes sense
when you want to deploy stuff on the cloud on Ubuntu with mostly identical
environment.

------
juangacovas
If you're having a hard time with Visual C++ Redist. packages on Windows for
WAMP, just try the packages on page bottom here:
[http://wampserver.aviatechno.net/?lang=en](http://wampserver.aviatechno.net/?lang=en)

~~~
leeshire
That solved a lot of headache geee thanks.

~~~
juangacovas
Welcome

------
LarryMade2
Linux Mint - was using Ubuntu but it isn't always up to date on PHP/MySQL
versions.

IDE - Eclipse/PHP

Never been a fan of Windows' inconveniences, and Apple is notoriously fickle
on Unix support, timeliness, versions, and patches.

------
rocketpastsix
Im on MacOS

I use PHPStorm for my IDE, but sometimes I try VS Code before I give up and
remember why I dont use it.

I use the Homestead Vagrant box from Laravel since my dev work is Laravel.

------
silb
Debian stable, Eclipse PDT, PHP 7.4 and Xdebug compiled from source.

------
cordaciu
iMac

All environment are setup using docker compose

PhpStorm & macVi

Search Results

Web result with site links

Sequel Pro for mysql management

