How to enable or alter loaded php extensions on premium hosting.
Author: admin admin Reference Number: AA-00274 Views: 34788 Created: 2012-08-07 16:16 Last Updated: 2025-08-11 15:29 0 Rating/ Voters

How to Enable PHP Extensions with cPanel and CloudLinux / Shared Hosting 

CloudLinux with cPanel provides multiple ways to manage PHP extensions depending. This guide shows how to enable PHP extensions from your  cPanel 

Understanding the Environment

CloudLinux uses alternative PHP versions (alt-php) . You can select different PHP versions and extensions through the Select PHP Version interface in cPanel.

Step 1: Access PHP Version Selector

  1. Log into your cPanel account
  2. Navigate to the Software section
  3. Click on Select PHP Version (or PHP Version Manager)

Step 2: Choose PHP Version

  1. Select your desired PHP version from the dropdown menu
  2. Available versions typically include PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4
  3. Click Set as current if changing versions

Step 3: Enable Extensions

  1. Click on the Extensions tab
  2. Browse through available extensions
  3. Check the box next to extensions you want to enable:
    • Common Extensions: mysqli, pdo, gd, curl, zip, json
    • Caching: opcache, memcached, redis
    • Development: xdebug, composer
    • Security: openssl, mcrypt
  4. Click Save to apply changes

Step 4: Verify Extension

Create a test PHP file to verify the extension is loaded

<?php
// Check if specific extension is loaded
if (extension_loaded('mysqli')) {
    echo "MySQLi extension is enabled";
} else {
    echo "MySQLi extension is not enabled";
}

// Display all loaded extensions
phpinfo();
?>
Quick Jump Menu