Updated: 4 November 2026 · Applies to: Phalcon 5.23 with PHP 8.3 on AlmaLinux 9 and Rocky Linux 9 (Remi packages) and Ubuntu 24.04 and Debian (PECL build)

On AlmaLinux or Rocky Linux, install Phalcon as a ready-made package from the Remi repository: dnf install php-phalcon5. On Ubuntu and Debian, build it with PECL: pecl install phalcon, then enable it with phpenmod phalcon. Phalcon 5 is a PHP framework delivered as a C extension and needs PHP 8.1 or newer.

This guide is for servers without a control panel. On a cPanel server, use WHM instead: see Install Phalcon PHP on cPanel with EasyApache 4.

AlmaLinux 9 and Rocky Linux 9 (Remi packages)

Remi's repository has Phalcon built for each PHP version, so nothing is compiled on your server. Add EPEL and Remi:

dnf install -y epel-release
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

Choose the PHP version (8.3 here) and install PHP with Phalcon:

dnf module reset -y php
dnf module enable -y php:remi-8.3
dnf install -y php-cli php-phalcon5

The package adds /etc/php.d/50-phalcon.ini, so the extension is on at once. If the site runs on PHP-FPM, restart it:

systemctl restart php-fpm

On version 10 of AlmaLinux or Rocky, use remi-release-10.rpm instead.

Ubuntu 24.04 and Debian (PECL build)

Neither distribution ships a Phalcon package, so build it with PECL. Install PHP, its development files and a compiler (PHP 8.3 here):

apt install -y php8.3-cli php8.3-dev php-pear gcc make re2c libpcre2-dev

Build and install Phalcon. Press Enter at the prompt:

pecl install phalcon

The PECL build needs a lot of memory. On our Ubuntu 24.04 test server (one CPU) it ran for over an hour and was stopped by the out-of-memory killer twice: once with 2 GB of memory, once with 3 GB of memory plus 1 GB of swap. Plan for more than 4 GB of free memory (memory plus swap). We could not finish this build on that small test server, so the Ubuntu steps above follow Phalcon's own installation guide. On AlmaLinux or Rocky Linux, the Remi package above avoids the build entirely.

Enable the extension for PHP 8.3:

echo "extension=phalcon.so" > /etc/php/8.3/mods-available/phalcon.ini
phpenmod -v 8.3 phalcon

Restart PHP-FPM if your site uses it:

systemctl restart php8.3-fpm

Phalcon's documentation also shows packages from a third-party PHP repository for Ubuntu. In our test they were older than the current release (5.20 and 5.9 next to each other, with PHP loading the older one), so the PECL build is the safer way to get the current version.

Check that it works

Confirm PHP loads the extension:

php -m | grep -i phalcon

Print the Phalcon version:

php -r 'echo (new Phalcon\Support\Version())->get(), PHP_EOL;'

Output on our AlmaLinux 9 test server:

5.23.0

php --ri phalcon shows the full extension details.

Common problems

  • Fatal error "Non-static method Phalcon\Support\Version::get()": older guides call Version::get() statically. Create the object first, as in the check above.
  • The build stops with "Killed signal terminated program cc1": the compiler ran out of memory. Add swap or move to a plan with more memory, then run pecl install phalcon again.
  • The command line shows Phalcon but the website does not: the web server uses PHP-FPM or another PHP version. Enable the extension for that version and restart its PHP-FPM service.
  • PHP 8.0 or older: Phalcon 5 does not support it; upgrade PHP first.

Need a server for a Phalcon application? Our KVM VPS plans give you root access to install it as shown here.

Was this answer helpful?

Still stuck? Open a ticket