Table of Contents
What you will read?
PHP is a widely used scripting language for web development. On macOS 2025, you can install the latest PHP version using Homebrew, the recommended package manager.
Step 1: Install Homebrew
If Homebrew is not already installed, open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Verify installation:
brew --version
Step 2: Update Homebrew
Make sure Homebrew is up to date:
brew update
Step 3: Install PHP
Install the latest PHP version:
brew install php
Step 4: Verify Installation
Check that PHP is installed and see the version:
php -v
Step 5: Start PHP Service (Optional)
You can start PHP as a background service if needed:
brew services start php
PHP is now installed on macOS 2025. You can start developing web applications or run PHP scripts directly from the terminal.
Follow DropVPS on Google
Add DropVPS as a preferred source to see our latest VPS guides and tutorials surfaced first in Google Search and AI Overviews.
Need a Linux Server for This?
Run Debian, Ubuntu, or any Linux distro on DropVPS — fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.
- Full Root Access
- Debian & Ubuntu Ready
- 99.99% Uptime
- 24/7 Support
No commitment · Cancel anytime
