How To Install PHP 8.4 on Amazon Linux 2023

PHP 8.4 is the latest major release of the PHP programming Language mostly used in the Development of Web Applications. It is the stable release and you can plan to migrate your applications but being aware that some could break especially where old features are deprecated.

In this article we will cover the installation of PHP 8.4 on Amazon Linux 2023 server running either in the Cloud or On-prem infrastructure.

Update Amazon Linux 2023 system

Update the system before starting the installation of PHP 8.4 on Amazon Linux 2023 server.

sudo yum -y update

Linux updates often comes with newer kernel patches and reboot is required for the system to run in this new release.

sudo systemctl reboot

Install PHP 8.4 on Amazon Linux 2023

PHP 8.4 is available in in amazonlinux repository together with it’s extensions. You can confirm this by running the command below:

sudo yum search php8.4

Sample Output:

To install PHP 8.4 on Amazon Linux 2023 with standard PHP extensions, run the command:

sudo yum install php8.4-{bcmath,cli,common,dba,dbg,devel,ffi,fpm,ldap,modphp,pgsql,mysqlnd,gd,mbstring,tidy,xml,zip}

Sample Output:

Check PHP version:

$ php --version
PHP 8.4.6 (cli) (built: Apr  8 2025 19:55:31) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Amazon Linux
Zend Engine v4.4.6, Copyright (c) Zend Technologies

Install Apache httpd web server to test PHP scripts execution:

sudo yum -y install httpd
sudo systemctl enable --now httpd

Create PHP info script inside default apache web root:

sudo tee /var/www/html/phpinfo.php > /dev/null <<EOF
<?php phpinfo(); ?>
EOF

Open your web browser and input http://SERVER_IP/phpinfo.php.

Check available extensions.

$ php --modules
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
random
readline
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

Refer to the official PHP 8.4 release page for more reading.

Other articles on Amazon Linux:

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Unlock the Right Solutions with Confidence

At CloudSpinx, we don’t just offer services - we deliver clarity, direction, and results. Whether you're navigating cloud adoption, scaling infrastructure, or solving DevOps challenges, our seasoned experts help you make smart, strategic decisions with total confidence. Let us turn complexity into opportunity and bring your vision to life.

Leave a Comment

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

Related Post

SQL stands for “structured query language” and it makes up the name MySQL, which is the combination of My and […]

Memcached is a free to use and open source in-memory, high-performance and distributed key-value store for small chunks of arbitrary data […]

Gitea is the fastest and most painless way of setting up a self-hosted Git service on premise, or in a […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.