How To Install PHP on Linux Mint 22

PHP is the most popular scripting language used in website and web applications development. The PHP language is released under open-source standards, also object-oriented and interpreted scripting language that can be executed at the server-side. Being an interpreted language it means there is no need for compilation as the application executes directly on the server to generate dynamic pages.

As of this article update the latest release of PHP available for installation is PHP 8.3. PHP is a simple language and easy to learn for those getting started with web development. PHP can also be embedded into HTML pages. This article will discuss the process of installing PHP on Linux Mint 22.

How To Install PHP on Linux Mint 22

You should have a running Linux Mint 22 installation to use this guide. Login as a user with sudo access and update your APT index:

sudo apt update

Once done then you can install PHP on Linux Mint 22. The default version available is PHP 8.3. The command below will install PHP 8.3 and standard extensions.

sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd  php-mbstring php-curl php-xml php-pear php-bcmath

Enter Y to proceed:

Confirm installation of PHP on Linux Mint 22:

$ php --version
PHP 8.3.6 (cli) (built: Mar 19 2025 10:08:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies

If you don’t want Apache web server disable its service.

sudo systemctl disable --now apache2

Other extensions of PHP can be installed using apt command by substituting <extension-name> with the extension you want to install.

sudo apt install php-<extension-name>

The example below installs PHP redis and memcache modules.

sudo apt install php-memcache php-redis

You now have PHP installed on your Linux Mint 22 system. If you intend on using PHP with nginx, the server can be installed by running the command below as sudo user.

sudo apt install nginx

Refer to nginxconfig.io for easy configuration of Nginx with PHP FPM.

Other Linux Mint guides:

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

In this tutorial we will cover step-by-step procedure of compiling Open vSwitch (OVS) from source code on Rocky Linux, AlmaLinux, […]

Open vSwitch (OVS) is an open source virtual switch widely adopted in network virtualization. OVS is popular in platforms like […]

Photoshop can be such a headache for both experts and beginners alike. Every time you open photoshop there’s always 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.