Skip to content
PortBay

Local development

Craft CMS local development on a Mac — without Docker

Craft 5 needs PHP 8.2+, a real database and sixteen extensions — none of which requires the Linux VM every DDEV guide starts with. The Docker route assessed fairly, and the native one-click setup.

Nour Beiruti6 min read

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 with credentials written into .env, 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 credentials

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.

PortBay mascot — a friendly blue tugboat

Run your first local site in one click.

Download for macOS

Free & open source · macOS 11+ on Apple Silicon · Pro from $10/mo