UnderHost
Knowledgebase Docs

How to enable PHP extensions in cPanel

Enable PHP extensions such as GD, Imagick, Redis, Intl, and others using MultiPHP INI Editor in cPanel.

On this page

PHP extensions add functionality to PHP-image processing, database drivers, caching, encoding, and more. Most required extensions are already enabled by default on UnderHost hosting. This guide shows how to enable ones that are installed but not yet active.

What are PHP extensions?

PHP loads optional functionality through extensions. Common examples:

  • GD / GD2-image creation and manipulation (required by most WordPress themes)
  • Imagick-advanced image processing using ImageMagick
  • Intl-internationalisation functions
  • Redis-Redis object caching (for WordPress performance plugins)
  • Memcached-memory-based caching
  • Zip-PHP ZIP archive handling
  • PDO / PDO_MySQL-PHP Data Objects for MySQL
  • Mbstring-multibyte string functions (required by WordPress)
  • Curl-HTTP requests from PHP (required by most themes and plugins)
  • Sodium-modern cryptographic functions

Enable extensions in cPanel

Extensions are enabled or disabled through the MultiPHP INI Editor:

  1. Open MultiPHP INI Editor

    Log in to cPanel and go to Software → MultiPHP INI Editor.

  2. Select the domain

    Choose the domain or the global home directory from the dropdown. Changes for a specific domain only affect that domain.

  3. Switch to the Editor tab

    Click the Editor tab (not the Basic Mode). This shows the raw php.ini settings for that domain.

  4. Add the extension

    Add a line in the format extension=extension_name. For example, to enable Redis:

    extension=redis

    Extensions are typically referenced without the .so suffix in modern PHP versions.

  5. Save

    Click Apply. The change takes effect immediately for new PHP processes on that domain.

Extension must be installed on the server

The MultiPHP INI Editor only enables extensions that are already installed as compiled modules on the server. You cannot install a new extension through cPanel-if the extension you need is not available, you must contact UnderHost support to request it be installed at the server level.

Common extensions and their php.ini directive

ExtensionDirectiveRequired by
GDextension=gdWordPress, most themes
Imagickextension=imagickAdvanced image processing
Redisextension=redisRedis caching plugins
Memcachedextension=memcachedMemcached object caching
Intlextension=intlMultilingual PHP apps
Zipextension=zipArchive handling, some plugins
Sodiumextension=sodiumCryptographic functions, WP 5.2+

Extension not listed or not working

If the extension you need does not load after adding the directive, or you cannot find the module:

  • Confirm you are using the correct PHP version for that domain (some extensions are only compiled for certain PHP versions)
  • Check the cPanel error log (Metrics → Errors) for a PHP warning about the missing module
  • Open a support ticket specifying the extension name, your PHP version, and why you need it-UnderHost can install it at the server level on shared hosting plans

Verify an extension is active

Create a temporary PHP file to check which extensions are loaded. Upload this file to your public_html folder via File Manager:

<?php phpinfo(); ?>

Open it in a browser (https://yourdomain.com/phpinfo.php). The output lists every active extension. Search the page for the extension name to confirm it is loaded.

Delete the phpinfo file after checking

The phpinfo() output reveals server configuration details. Delete the file immediately after checking-leaving it publicly accessible is a security risk.

Related: Changing PHP version in cPanel (MultiPHP Manager) | Error logs in cPanel: find PHP and website errors | WordPress performance optimization | Redis object cache for WordPress - speed up database queries

Was this article helpful?

Need cPanel hosting or licensing?

Use UnderHost cPanel hosting or add cPanel/WHM to a VPS or dedicated server for familiar website, email, DNS, and database management.

Related articles

Back to cPanel