Re:PHP in 2024
by dan222 on Wednesday April 10, 2024 @07:16AM
(#39989381)
Can anyone help me as a newbie? I see many comments saying php is so simple to use, but I'm getting bogged down with Docker / Composer etc etc. There seems to be a lot to learn, am I going about it the wrong way? What's the simplest setup that I can use for production as well as dev (otherwise I'd just use laragon). Thanks.
[ Parent
| on HN ]
For me the journey kinda started by checking which was the most common way of installing PHP on the OS I'm using. If you're on MacOS then nothing beats homebrew.
The main thing is to try and use the latest stable version and then go from there. This should make life easier when it's time to update or when you start to deal with having to install/enable certain extensions.
I've tried setting up Docker but finally just set everything up in Debian so I can use VSCodium without issues.
In production (for a newbie) I would just go with something like a small 5-10$ VPS running Ubuntu with Plesk control panel which will help you setup and keep things updated (you'll have the option/warning of changing PHP version for each website in the control panel)
One (hacky) way to learn is to just install WordPress (apparently not fashionable these days, but I love it) and start messing around with the PHP in theme files. Turn on error reporting and just start breaking things.