Sunday, January 26, 2025How to install PHP
Keven Client A. Cataluña @LinkedIn
Introduction

This guide explains how to install PHP on Ubuntu using the Ondřej PPA repository and the necessary PHP modules.

PHP 8.2PHP 8.3
Steps1. Add ondrej/php repository
    sudo add-apt-repository ppa:ondrej/php
  
2. Update and upgrade the packages
    sudo apt update && sudo apt upgrade
  
3. Install the PHP 8.3 packages
    sudo apt install php8.3-common php8.3-cli php8.3-fpm php8.3-{curl,bz2,mbstring,intl}
  
4. Verify the PHP 8.3 installation
    php -v
  
      PHP 8.3.9 (cli) (built: Jul 5 2024 12:03:23) (NTS)
  Copyright (c) The PHP Group
  Zend Engine v4.3.9, Copyright (c) Zend Technologies
      with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies