Almost every Craft CMS local-development guide starts the same way: install DDEV, which means installing Docker, which on a Mac means running a Linux virtual machine to serve a PHP site. DDEV is a fine tool — but nothing in Craft's actual requirements demands it. Craft 5 needs PHP 8.2+, a real database (MySQL 8.0.17+, MariaDB 10.4.6+ or PostgreSQL 13+) and sixteen common PHP extensions — all of which run natively on macOS. Here's the honest comparison of both routes.
The DDEV route, assessed fairly
Craft's own tutorials use DDEV, and it earns the position: one config file gives every team member an identical containerized stack, with per-project PHP and database versions that can mirror production exactly. The costs are Docker's, not DDEV's: a VM that holds memory while idle, slower file I/O on macOS for big vendor/ trees, and one more daemon that has to be running before ddev start works. If your team already standardized on it — especially with Linux-specific services in the mix — stay; consistency across a team is worth real overhead. The general case against containers-for-web-dev is made honestly in our Docker-alternative guide.
The native route
Solo or in a small team, the native path is simpler than its reputation. Homebrew's PHP ships with nearly all sixteen required extensions compiled in (Intl, GD, BCMath and friends included — run Craft's server check script to confirm), and MySQL or Postgres install natively next to it. The fiddly parts are the usual ones — a web server config, trusted HTTPS for the control panel, and mail capture so Craft's system emails land somewhere visible. Assembling that by hand is a known quantity: our PHP version guide and local HTTPS guide cover those layers.
The one-click native setup
Or skip the assembly: PortBay (free, open source, macOS) provisions the Craft requirements per project — a pinned PHP 8.2+ runtime, a per-project MySQL, MariaDB or PostgreSQL database whose connection lands in your .env during setup, trusted HTTPS on yoursite.test(Craft's control panel and live preview behave properly on a real HTTPS origin), and Mailpit catching every system email. The setup:
composer create-project craftcms/craft mysite
# add the folder to PortBay, press Play
php craft setup # point it at the .env credentialsCraft + PortBay, step by step
Three lines compress a real sequence, so here it is in full, in the order that avoids backtracking.
- Create the database first.Craft's installer asks for a working database before it does anything else. Open Databases in PortBay, pick MySQL, MariaDB or PostgreSQL (Craft 5 supports all three), name the instance, and click Create. First-time initialisation runs in the background and takes 30 to 120 seconds for MySQL and PostgreSQL. When it finishes, the Connection panel shows the host, port and user you will feed the installer, and a Client button opens
mysqlorpsqlpreconfigured for the instance if you want to look inside it later. - Create the project and add it. Run the composer command above, then point PortBay at the folder and set the document root to
web, the directory Craft serves from. The project pins its own PHP version; if no 8.2+ install exists on the machine, the Languages screen shows thebrew installcommand and can run it for you. - Run the installer.
php craft setupwalks through the connection: host127.0.0.1, the port from the instance's Connection panel, userrootfor MySQL and MariaDB orpostgresfor PostgreSQL, empty password. The wizard writes the values into.envand installs Craft. Linking the instance to the project in PortBay also injectsDATABASE_URLand theDB_*variables into the project's process on every start, with your.envvalues winning on conflict. - Press Play. PortBay issues a certificate for
mysite.testthrough mkcert, resolves the hostname with its managed local DNS, and routes requests through a bundled Caddy edge to PHP-FPM. The control panel and Live Preview load on an HTTPS origin the browser trusts, with no port numbers and no certificate warnings to click through. - Wire the system emails. Mailpit starts with the app and listens on
127.0.0.1:1025. Point Craft's email settings (Settings → Email, transport type SMTP) at that host and port, and every test of user activation or password reset lands in the local inbox at127.0.0.1:8025instead of a real mailbox. - Debugging. The command palette toggles Xdebug per PHP project. Requests get slower while it is on, so treat it as a switch you flip for a session, not a default.
The end state: https://mysite.test/admin over trusted HTTPS, a database the project owns, and captured mail, with nothing installed beyond the engine binaries Homebrew put on the machine.
From there it's a normal Craft project — native composer speed, no VM, and the same app runs your other PHP and Node projects alongside it. The honest scope note: if you need production-parity containers or Linux-only services, that's DDEV's home turf; for the common case — building Craft sites on a Mac — the native stack is faster and lighter. Compared to the other managed tools, Herd gates databases and mail behind Pro, MAMP shows its age on HTTPS and domains, and ServBay does cover the stack on a subscription. PortBay is a free download if you want the one-click version.
