Prerequisite: install PHP

Install PHP on macOS

Ref: https://www.php.net/manual/en/install.macosx.php

One easy way to install PHP on macOS is using Homebrew. Open a Terminal and paste the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Once Homebrew is installed, proceed to installing PHP:

brew install php

When installation is complete, verify PHP was installed successfully by executing

php -v

You should see an output similar to

PHP 8.4.10 (cli) (built: Jul  2 2025 02:22:42) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
Zend Engine v4.4.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.10, Copyright (c), by Zend Technologies

(Alternative ways to install PHP on macOS are available on PHP project website.)

Install PHP on Windows

The Windows install is outlined in detail in Running Local Server on Windows.

Install PHP on Linux

Ref: https://www.php.net/manual/en/install.unix.php

Install PHP with:

Debian / Ubuntu / Windows Subsystem for Linux

apt install php-common php-cli

Red Hat Enterprise Linux, OpenSUSE, Fedora, CentOS, Rocky Linux, Oracle Enterprise Linux

dnf install php php-common

For all distributions, check success with

php -v

You should see an output similar to

PHP 8.2.28 (cli) (built: Mar 13 2025 18:21:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies

Note: Different Linux distributions will have different PHP versions in their package repositories (above output is from debian). If you want to install the latest PHP version, you may consider building from source.

Note: Your locally installed PHP version is only a prerequisite to install Altis. The actual PHP version to be used when running your project(s) is provided as a docker container, specific to each Altis version we maintain. Refer to our PHP Version Guide for up-to-date compatibility, testing and upgrading information.