Current Location: Home> Latest Articles> How to Install PHP 8.0 on Different Operating Systems

How to Install PHP 8.0 on Different Operating Systems

M66 2025-07-13

How to Install PHP 8.0 on Linux

Installing PHP 8.0 on Linux is relatively simple. Follow these steps to complete the installation.

Update APT Repositories

sudo apt update

Install PHP 8.0

sudo apt install php8.0

Verify Installation

php8.0 -v

How to Install PHP 8.0 on Windows

Installing PHP 8.0 on Windows is also straightforward. You can complete the installation by following these steps.

Download PHP 8.0 from the Official Website

Visit the PHP official website and select the PHP 8.0 version that matches your Windows operating system version.

Run the PHP Installer

After downloading the installer, double-click to run it and follow the instructions to complete the installation.

Verify Installation

php --version

How to Install PHP 8.0 on macOS

To install PHP 8.0 on macOS, you can use the Homebrew package manager. Here's how:

Install PHP with Homebrew

brew install php@8.0

Verify Installation

php -v

Install PHP Extensions

If you need to install PHP extensions, you can follow these commands.

Install PHP Extensions on Linux

sudo apt install php8.0-extension-name

Install PHP Extensions on Windows

pecl install extension-name

Install PHP Extensions on macOS

brew install php@8.0/extension/extension-name

Once you complete these steps, PHP 8.0 and the necessary extensions will be successfully installed on your operating system. Be sure to replace "extension-name" in the commands with the name of the PHP extension you wish to install.