Updated: 28 September 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12

The GMP extension gives PHP fast arithmetic with very large numbers (used by some cryptography and billing code).

cPanel servers (EasyApache 4)

dnf install ea-php83-php-gmp

Or switch on php-gmp in WHM › Software › EasyApache 4 › Customize › PHP Extensions. Replace 83 with your PHP version.

Other servers

dnf install php-gmp        # AlmaLinux / Rocky
apt install php-gmp        # Ubuntu / Debian

Then restart PHP-FPM or the web server, and check with php -m | grep gmp.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket