Updated: 28 September 2026 · Applies to: PHP 8.1 to 8.4 on cPanel & WHM 138 (Jupiter theme)

The php -m command lists the extensions (modules) loaded by the PHP command-line interpreter.

Examples

php -m                     # all loaded modules
php -m | grep -i mbstring  # check for one module
php -i | grep -i "loaded configuration"   # which php.ini is used

On cPanel servers each PHP version has its own binary, for example /opt/cpanel/ea-php83/root/usr/bin/php -m (or /opt/alt/php83/usr/bin/php -m on CloudLinux).

Note: The command-line PHP can differ from the version and settings your website uses. To check the website's modules, use a phpinfo() page.

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