Native PHP
Native PHP runs your Laravel and PHP projects on your Mac, without Docker. DevWorkspace Pro runs PHP-FPM, MySQL or MariaDB and nginx for the project, and opens it at https://<name>.test. To create a new project on native PHP, select Native PHP in New Project. To move a DDEV project to native PHP, use the DDEV to Native PHP recipe. To move it back, use the Convert to DDEV recipe.
Native PHP works only on macOS for now, and it needs Homebrew. Support for Linux and WSL is coming. Native sites work only while DevWorkspace Pro is open. DevWorkspace Pro starts the native services when it opens, and stops them when it quits.
What DevWorkspace Pro installs
The first move installs only the parts that your Mac does not have yet, with Homebrew:
| Part | Homebrew formula |
|---|---|
| PHP | [email protected] from the shivammathur/php tap. If you already have the same [email protected] from Homebrew, DevWorkspace Pro uses it. |
| Database | [email protected] or [email protected], the version that you pick in the recipe |
| Web server | nginx |
| Firefox certificate tool | nss, only when Firefox is installed. The move uses its certutil to add the CA to Firefox. |
| Share | cloudflared, only when you click Install cloudflared and share |
DevWorkspace Pro does not link the PHP and database formulae, so the php and mysql commands in your own terminal stay as they are. If your shell has no mysql command, the move adds one. See Which PHP the command line uses. If a PHP version would replace the php command that you have, the recipe shows (upgrades your php command) next to it. Pick it only if you want that.
Each database version runs one server for all native sites, on 127.0.0.1 only. The first server uses port 3307, and the next one uses the next free port. The user is root with no password.
Ports
Native sites use ports 80 (HTTP) and 443 (HTTPS). If the DDEV router uses 80 and 443 at the first move, native sites use 8080 and 8443, for example https://shop.test:8443. The ports do not change when DDEV stops. The HTTP port only sends visitors to HTTPS.
To use other ports, go to Preferences > Native PHP, type the HTTP port and the HTTPS port, and click Save ports. You can do this before the first move, for example when Herd or Valet uses ports 80 and 443. After a move, a new port changes the URL of every native site, and DevWorkspace Pro updates APP_URL in the .env of each Laravel site that uses the old URL. The Overview tab of each native project shows the new URL at once.
.test domains
DevWorkspace Pro answers .test names on your Mac, so you do not need entries in /etc/hosts. At the first move, it writes /etc/resolver/test. This file sends .test names to DevWorkspace Pro on 127.0.0.1, port 53535. macOS asks for your password for this step.
If Herd or Valet already answers .test names, DevWorkspace Pro uses that and does not change the file. If /etc/resolver/test sends .test names to a DNS server that does not answer, the move replaces the file and keeps the old one as /etc/resolver/test.dwp-backup.
HTTPS and the local certificate authority
DevWorkspace Pro makes its own certificate authority (CA), DevWorkspace Pro Local CA, and signs a certificate for each native site with it. At the first move, macOS asks for your password to trust the CA in your login keychain. Safari and Chrome then open native sites with no warning.
- The CA can sign certificates for
.testnames only. A certificate for any other name that it signs is refused. - The key of the CA is encrypted on your Mac.
- The CA lasts 10 years. Site certificates renew by themselves before they end.
So the first move asks for your password at most twice: once for .test names and once for the CA. The recipe tells you how many times before you start.
Trust in other tools
The CA file is ~/Library/Application Support/DevWorkspace Pro/native-php/tls/ca.pem.
| Tool | What to do |
|---|---|
| Safari, Chrome | Nothing. They use your login keychain. |
| Firefox | The move adds the CA to each Firefox profile, as mkcert does. If Firefox is open during the move, quit and open it again. Firefox also uses the macOS certificates when security.enterprise_roots.enabled is on, which is the default. If macOS does not let DevWorkspace Pro open the Firefox profiles folder, quit and open Firefox again. If Firefox still shows a certificate error, import ca.pem in Firefox Settings > Privacy & Security > Certificates. |
| PHP in native sites and queue workers | Nothing. They use a bundle of the system certificates and the local CA, so Http::get('https://other.test') works. |
| Node.js | DevWorkspace Pro terminals set NODE_EXTRA_CA_CERTS for you. In your own terminal, add export NODE_EXTRA_CA_CERTS="$HOME/Library/Application Support/DevWorkspace Pro/native-php/tls/ca.pem" to your shell file. |
| curl and other command line tools | Pass the CA file, for example curl --cacert "$HOME/Library/Application Support/DevWorkspace Pro/native-php/tls/ca.pem" https://shop.test. |
| PHP on the command line | Pass the bundle: php -d openssl.cafile="$HOME/Library/Application Support/DevWorkspace Pro/native-php/tls/ca-bundle.pem" artisan ... |
Which PHP the command line uses
DevWorkspace Pro has its own php and composer commands. In the folder of a native site, php is the PHP version of that site. In other folders, it is the Default PHP version, or the php on your PATH.
DevWorkspace Pro terminals put these commands first on PATH. But your shell startup files can put another php before them, for example eval "$(/opt/homebrew/bin/brew shellenv)" in ~/.zprofile. Run which php to check.
To get the DevWorkspace Pro php and composer in your own terminal, and in DevWorkspace Pro terminals when your startup files change PATH, turn on Use DWP PHP in my shell in Preferences > Native PHP. DevWorkspace Pro adds one line at the end of ~/.zshrc (or your bash profile file), and removes only that line when you turn it off. Open a new terminal after you change it.
Laravel runs mysql (or mariadb for MariaDB) to load a schema dump from database/schema in php artisan migrate. If your shell does not find the database client at the move, the recipe adds the DevWorkspace Pro database client folder to PATH, with its own line at the end of the same file. In the folder of a native site, mysql and mysqldump are the client of the database version of that site. In other folders, they are the ones on your PATH, or the client of the last site that you moved. MariaDB sites also get mariadb and mariadb-dump. Open a new terminal after the move.
Preferences > Native PHP
Open Preferences and click the Native PHP tab. The buttons and settings on this tab act at once. Save and Cancel at the bottom of Preferences do not change them.
| Card | What you can do |
|---|---|
| PHP and ports | Default PHP version for new moves. Each project can pick another version in the recipe. HTTP port, HTTPS port and Save ports. See Ports. |
| .test domains and HTTPS | The state of .test names and of the CA. Trust again when your Mac does not trust the CA. Make a new CA when the CA has ended, ends in less than 30 days, or its key cannot be read. Remove .test setup. |
| Use DWP PHP in my shell | See Which PHP the command line uses. |
| Databases no site uses | Databases left after Convert to DDEV. Click Drop, then click Drop with the database name to delete one. This cannot be undone. |
Make a new CA removes the old CA, makes a new one, signs new certificates for all native sites and reloads nginx. Then macOS asks for your password to trust the new CA. If you cancel that dialog, the sites still work, but browsers show a warning. Click Trust again later.
Remove .test setup removes /etc/resolver/test when DevWorkspace Pro made it, and puts back /etc/resolver/test.dwp-backup if the move kept one. It also removes the CA and its trust in your keychain. Click Remove to confirm. Native sites stop working until you set it up again. macOS may ask for your password.
Services
Click the server icon at the top right of the app, next to the Focus Pad icon. The menu shows nginx, each PHP-FPM version and each database server. The dot on the icon is green when all of them run, and red when one has crashed. For each service, you can Restart (or Start), Stop and Open log. Start all and Stop all act on all of them. The icon shows only when you have a native site.
If nginx, PHP-FPM or a database server keeps stopping, DevWorkspace Pro marks it as crashed and tries again later, with a longer wait each time. It starts working again on its own when the problem clears. When another program holds the port, the menu tells you the program name and its process ID. You can also click Restart to try at once.
Queue workers
The Overview tab of a native Laravel project has a Queue workers card. A worker runs on your Mac and starts again if it stops. If the project has no worker, click Start a queue worker. It runs php artisan queue:listen --tries=1 --timeout=0, so each job uses your latest code. A move from DDEV brings the queue workers of the DDEV project. A queue:work worker runs as queue:listen with the same options, without the options that only queue:work has, such as --max-jobs.
Each worker on the card has a switch. Turn it off to stop the worker. It stays off, also after you restart DevWorkspace Pro, until you turn it on again. Click Manage to see the command of each worker, Restart or Remove a worker, Open log, or Add worker.
Share a native site
Click Share at the top right of the project page. It gives the site a public https://...trycloudflare.com link through a Cloudflare quick tunnel. You do not need a Cloudflare account. Anyone with the link can open the site until you click Stop sharing. If cloudflared is not installed, the button is Install cloudflared and share. While a share runs, the Share button on the project page shows a green dot.
Laravel builds its links, redirects and asset URLs on the tunnel address, with https, so you do not need to change trustProxies.
While npm run dev runs (the public/hot file exists), the shared page loads its CSS and JavaScript from Vite on your Mac, and visitors cannot reach it. Share tells you so. Stop npm run dev and run npm run build, then open the link again.
A share stops when you quit DevWorkspace Pro.
Logs
Click Open log next to a service in the services menu, or next to a worker in Queue workers > Manage on the Overview tab. The logs are in ~/Library/Application Support/DevWorkspace Pro/native-php/logs/. The log of a queue worker is <site>-<worker>.log.
Limits
- macOS only for now. Linux and WSL support is coming.
- Project types
laravelandphpwith thenginx-fpmweb server, and MySQL or MariaDB. PostgreSQL projects stay in DDEV. - Xdebug is not set up for native sites yet.
- Laravel mail goes to the Laravel log (
MAIL_MAILER=log). - Node.js and Composer run from your Mac PATH.
AI agents
An AI agent can move projects, follow the move, check host tools and share sites with the native PHP tools of the MCP server.