How to Install PHP 8.3 on AlmaLinux 10

How to install PHP 8.3 on AlmaLinux 10

In this blog post, we will explain how to install PHP 8.3 on AlmaLinux 10 OS. PHP is an open-source scripting language widely used designed mostly for web development. PHP is a versatile language that can be used for different tasks, such as creating dynamic web pages and applications, managing sessions, and interacting with databases. The PHP code is executed on the server, is typically embedded within the HTML, and PHP enables websites to display different content based on the user’s input. The most common usage of PHP is building CMS websites like WordPress, e-commerce platforms like Magento, and social networks like Facebook. The PHP language has a very large community of developers providing support at any time. In the following headings, we will explain different ways of installing PHP8.3.

Installing PHP8.3 on AlmaLinux 10 is a straightforward process that may take a couple of minutes or slightly longer, depending on the installation method. Let’ get started!

Prerequisites

  • A server running AlmaLinux 10 OS
  • User privileges: root or non-root user with sudo privileges

Update the System

Before we start with the installation of PHP, we will update the system packages to their latest versions. Execute the following command:

sudo dnf update -y && sudo dnf upgrade -y

Install PHP via the default Repository

The good thing about AlmaLinux 10 and PHP 8.3 is that PHP 8.3 is included and enabled in the AlmaLinux 10 OS by default. So installing via this repo is a straightforward process by executing the following command:

sudo dnf install php -y

Once installed, to verify the version, execute the command below:

php -v

You should receive output similar to this:

[[email protected] ~]# php -v
PHP 8.3.19 (cli) (built: Mar 12 2025 13:10:27) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.19, Copyright (c) Zend Technologies
with Zend OPcache v8.3.19, Copyright (c), by Zend Technologies

To install other PHP extensions, you can use the following command:

sudo dnf install php-cli php-fpm php-curl php-mysqlnd php-gd php-readline php-mbstring php-apcu php-xml php-dom php-opcache php-zip php-intl php-common php-bcmath php-json -y

To check the installed PHP extension, you can use the command below:

php -m

The output will be long and will look like this:

[[email protected] ~]# php -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
random
readline
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

This was installing PHP 8.3 via the default repo. Let’s proceed to the next heading, where we will explain how to install it from source.

Installing PHP8.3 from Source

The installation of PHP8.3 on AlmaLinux 10 from source requires several steps, such as installing prerequisites, downloading the PHP8.3 version, configuring, compiling, and lastly installing. We will go through these steps in this heading. Let’s get things done!

First, enable the power tools repo, necessary for the PHP prerequisites.

sudo dnf config-manager --set-enabled crb

To install the required prerequisites, execute the command below:

sudo dnf install -y wget tar gcc gcc-c++ make autoconf libxml2-devel sqlite-devel curl-devel openssl-devel bzip2-devel libjpeg-turbo-devel libpng-devel freetype-devel libwebp-devel libxslt-devel libicu-devel systemd-devel oniguruma-devel

Once the prerequisites are installed, the next step is to download the exact PHP 8.3 version. In the previous heading, we installed PHP 8.3.19 via the default repo, and now let’s download it so we can install from source:

cd /opt

wget https://www.php.net/distributions/php-8.3.19.tar.gz

tar -xzf php-8.3.19.tar.gz

cd php-8.3.19

Next is to configure the PHP with the PHP extensions:

./configure --prefix=/usr/local/php8.3 \
--with-config-file-path=/usr/local/php8.3/etc \
--with-config-file-scan-dir=/usr/local/php8.3/etc/php.d \
--enable-mbstring \
--enable-mysqlnd \
--with-curl \
--with-openssl \
--with-zlib \
--with-webp \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx

Once, compile the PHP with the following command:

make -j$(nproc)

You should allow some time for the compilation process to finish. It took 10 minutes to compile it. Once the compilation is done, we can install PHP 8.3 with the command below:

sudo make install

After the installation, we can check the installed version with the following command:

/usr/local/php8.3/bin/php -v

You should get the following output:
[root@localhost php-8.3.19]# /usr/local/php8.3/bin/php -v
PHP 8.3.19 (cli) (built: Aug 14 2025 17:36:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.19, Copyright (c) Zend Technologies

To make a shortcut of this command, we can simply make a symbolic link:
ln -s /usr/local/php8.3/bin/php /usr/bin/php

Now you can check the installed version with the same command as in the previous heading:

[[email protected] php-8.3.19]# php -v
PHP 8.3.19 (cli) (built: Aug 14 2025 17:36:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.19, Copyright (c) Zend Technologies

Conculsion

That’s it. You successfully installed PHP8.3 on AlmaLinux 10. If you want to install PHP8.3 fast, you can use the first option with the default repo. Otherwise, if you want to install a specific version of PHP8.3. x, then you can use the second option from the source.

If you have difficulties with this installation, our Linux admins will help you with any aspect. You need to sign up for one of our monthly hosting management or per-incident server support plans. Do not hesitate to contact us at any time. We are available 24/7.

If you liked this post teaching you how to install PHP 8.3 on AlmaLinux 10, please share it with your friends or leave a comment below letting us know.

Leave a Reply

Your email address will not be published. Required fields are marked *