Menu

1 / 2

Installing PHP and PHP-FPM on Ubuntu 26.04

DEV Community·Aashish Chaurasiya·6 months ago
#ENdVQShY
#install#php#linux#ubuntu#enter
Reading 0:00
15s threshold

Ubuntu 26.04 ships PHP 8.5 in its default APT repository, and PHP-FPM handles PHP execution through a FastCGI process pool that scales independently of the web server. This guide installs PHP 8.5 with common extensions, configures PHP-FPM, and integrates it with Nginx so PHP requests are processed efficiently. By the end, you'll have PHP and PHP-FPM running with Nginx serving a verified PHP page.

Install PHP

PHP 8.5 is available in Ubuntu 26.04's default APT repository.

1. Update the APT package index:

$ sudo apt update

Enter fullscreen mode

Exit fullscreen mode

2. Install PHP:

$ sudo apt install php -y

Enter fullscreen mode

Exit fullscreen mode

3. Verify the installed version:

$ php --version

Enter fullscreen mode

Exit fullscreen mode

Install PHP Extensions

Extensions add capabilities like database connectivity, image processing, and archive handling.

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.