One-Click PHP Installation on Windows, macOS, and Linux

This guide shows how to quickly install PHP on Windows, macOS, and Linux by running a single PowerShell or Bash command that configures execution policy, sets security protocols, and downloads the installer script from php.new, with screenshots for verification.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
One-Click PHP Installation on Windows, macOS, and Linux

This tutorial explains how to install PHP, Composer, and Laravel on Windows, macOS, and Linux using a single command for each operating system.

Windows

Open PowerShell in administrator mode, paste the command below, and press Enter:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows'))

The script automatically downloads and installs PHP, Composer, and Laravel.

macOS

Open Terminal, paste the following command, and run it:

/bin/bash -c "$(curl -fsSL https://php.new/install/mac)"

Linux

Open Terminal, paste the command below, and execute it:

/bin/bash -c "$(curl -fsSL https://php.new/install/linux)"

After the command completes, PHP, Composer, and Laravel are ready for use from the terminal.

Verification screenshots are provided below.

Windows installation screenshot
Windows installation screenshot
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxPHPWindowsInstallationmacOSBashPowerShell
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.