Hey,
I think this is what you Need:
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I am curious as to how everyone is using their PHP/sql setup with Mac. Coming from windows I have only ever used XAMPP, and I am having some difficulties getting it set up without xampp. Whats the best steps for this?
Hey,
I think this is what you Need:
I install the latest PHP via Homebrew http://brew.sh then I use something like Vagrant/Homestead http://laravel.com/docs/5.1/homestead to ease the pain of setting up Nginx/Apache and all the other goodies :)
Currently going through that document now, but my localhost fails at the first step but say Syntax is OK. Not sure if this could be an error caused by having MAMP installed in the past messing stuff up. Not too sure
I would sway away from installing the software directly on your Mac. It's a pain and you can work so much faster within a VM. Once you start using it you'll wonder why you weren't using it sooner.
I have never used Vagrant/Homestead/Laravel. I am currently a junior front end dev, but in the progress of learning PHP. So not sure if something like that would go well?
@Fenwick17 I taught a front-end designer how to use Homestead and he picked it up in about an hour of looking around and trying things. I've setup Apache/Nginx/PHP/MySQL etc loads of times and it's so much easier using a VM with that already installed or ready to go with a few config options. If you try and set it up and have an issue, just come on here and post your problem. We will help as much as we can!
@mke-media
+1 guide.
I've used older versions of that guide.
@Fenwick17 don't foget to restart apache when you make changes to it.
sudo apachectl graceful
That command will ask for your password to restart apache.
+1 brew get sequel pro instead of using phpmyadmin (but phpmyadmin is good to know though) get source tree what ever editor you like
I'm old school so I like using the software that is built into the OS. I also can't understand why you are running a virtual server on top of a server for daily development. Besides it uses ram. Many people like to use a virtual machine because you can setup an OS to match the production server environment which is really smart. OSX is smart but stupid at the same time. The file system dOesN't CAre wHat casE you Write IN. This is a problem that continues to exist because of Adobe. You can change case sensitivity on OSX but many applications may break. Anyway, if you are not very careful with case, a linux server will give you a lot of problems because they are normally case-sensitive. Also, the gotcha will be when you thought github got updated but it didn't!
bashy really knows his stuff but I wanted to give you a different perspective too.
I will look into Homestead and VMs a bit more after work tomorrow and see what I think regarding that. Though I feel the old school approach might be best for me, as I wont be using Homestead etc at work, just plain ol' php. Managed to get my localhost to say "it works" so thats step one, but it does show a Xampp favicon so I might need to investigate that incase some Xampp stuff is still chilling somewhere on my machine.
I was also an Xampp user, in fact I still use it under windows..... ocassionally. However, I have moved to using Homestead/Vagrant in Windows and OSX. I find not installing unnessary software on my machine is a bonus when using a VM like Homestead.
I have a complete set of tutorial notes on how to configure the environment in Windows (transferable to OXS) if you are interested.
I used to (and still do sometimes) love setting it all up manually! I can still do it on OS X and Linux (as I do with each of my servers). I'd been doing it that way for years but as soon as I started working on a VM I knew I couldn't keep doing it the manual way. There's so many great tools that have come out in the last year or so... it's amazing.
Don't get put off by having a VM on top of your OS. It can be confusing to why you would do that but once you realise the benefits, it will be clear :)
Happy DevOps!
Any good tutorials you recommend for setting it up? Since I won't be using laravel straight away (Still learning some php basics)
@Fenwick17 I'd suggest looking over this series (or a few videos from it) to get you setup with Homestead: https://laracasts.com/series/laravel-5-fundamentals/episodes/2
Think there's others.
I use the following works well for me -> https://mallinson.ca/osx-web-development/ and then I also have the brew php switch installed https://github.com/philcook/brew-php-switcher
I plan on also using PHPstorm and Sequel pro, but not too sure how they interact with a Mamp/xampp setup. Guessing PHPstorm could just save files to htdocs/sites depending on PHP setup?
@bashy It appears I have been misunderstanding how Homestead works, I was thinking that is Laravel, not a Vagrant Box, I will be sure to look into this tonight.
Also, note that OSX come with Apache and PHP by default and you can just activate it.
http://osxdaily.com/2012/09/02/start-apache-web-server-mac-os-x/
I still recommend you to use vagrant to have a VM. It's a way much better because you'll not make dirty your host system by installing many dependencies.
@Fenwick17 Yes it's a VM with a Ubuntu image. It's basically a Linux web server setup on your computer. You can use PHPStorm and Sequel Pro with it. I do the exact same.
@bashy So I would be using Sequel Pro through OSX which connects to the VM and vice versa? Ill check it out tonight, does seem quite interesting. And if im not a fan, then at least I have tried other options. Win win situation
So I would be using Sequel Pro through OSX which connects to the VM and vice versa?
@Fenwick17 Exactly!
Indeed! I tunnel it through SSH for ease of use :)

@bashy @RomainLanz Starting to understand how it works now then, seems quite interesting. Would you be using PHPstorm within OSX and linking that to VM as well? Or would that be PHPstorm inside the VM.
I am actually looking forward to giving this a go now haha
@Fenwick17 With Homestead you have a config file to share some folder between your VM and your host system.
folders:
- map: ~/projects/php
to: /home/vagrant/Code
Here's an example of mine:
ip: "192.168.250.250"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/projects/php
to: /home/vagrant/Code
sites:
- map: qualitas-helvetica.dev
to : /home/vagrant/Code/qualitas-helvetica.ch/public
- map: t21.dev
to : /home/vagrant/Code/t21/public
- map: strat-talks.dev
to : /home/vagrant/Code/strat-talks.dev/public
databases:
- qualitas
- t21
- strat-talks
variables:
- key: 'APP_ENV'
value: 'local'
- key: 'APP_DEBUG'
value: 'true'
@Fenwick17 The files for your sites will be mounted from your local files. None of that will (and shouldn't) be directly on the VM HDD. This makes it just like normal. It mounts the directory you select in Homestead.yaml
@bashy @RomainLanz Sounds good, all starting to make sense. I will give that a test tonight using the Laravel fundamentals track. Hopefully I can get up and running and building pretty quickly :)
@jason-kenyon linked to a good article.
Here"s a list of apps from it:
CodeKit (Front End Toolbox) => I hand code, so ... don't know what to offer as an alternative.
Coda / Sublime Text / Atom (Great IDEs / Text Editors) => PHPStorm offers opensource licenses (free, rquirement - github active account) they are now moving to a subscription service ... haven't converted yet.
Navicat (MySQL GUI) => mysequel pro and mysql workbench, they are free
Transmit (The best FTP program ever made) => cyberduck, it's free but not as pretty
Tower (Git Manager) => sourcetree, it's free but not as pretty
FYI phpmyadmin is depreciated now. One of the devs started a new project. Unfortunately I for got the name but Ubuntu users have it in their application store thing.
@jekinney Depreciated from what? Still actively updated on GH: https://github.com/phpmyadmin/phpmyadmin
So I am following https://laracasts.com/lessons/say-hello-to-laravel-homestead-two for my initial set up. And I am not too sure how I feel about it. Seems like it takes a very long time to get anywhere, about 30 minutes and I still havent got the Laravel splash screen yet
Well the initial setup will take a bit but once you get the flow going, you can add a new Laravel site in about 2 minutes?
@bashy Is the initial setup a lot more time consuming than say if I was to start a second project?
Please or to participate in this conversation.