How to Enable or Disable PHP Modules in cPanel Print

  • php modules, cpanel, php extensions, php version, php configuration, enable php modules, disable php modules
  • 8

You can enable or disable specific PHP modules (also called libraries or extensions) for your hosting account directly through cPanel's PHP Selector tool. This allows you to customize which PHP functionality is available for your website, ensuring compatibility with your applications or CMS requirements.

Managing PHP modules gives you control over features like database connections, image processing, caching, and more. The process takes just a few minutes and changes typically take effect within moments of saving your settings.

Steps to Enable or Disable PHP Modules

Follow these steps to manage your PHP modules in cPanel:

  1. Log in to your cPanel account using your credentials
  2. Locate the PHP Selector tool (usually found in the Software section)
  3. Select your desired PHP version from the drop-down menu. You can choose a different version or keep the current one (Native). For example, you might select PHP 7.4 or PHP 8.1 depending on your needs
  4. Click 'Set as current' to confirm your PHP version selection
  5. Review the list of available modules that appears below. Each module has a checkbox next to it
  6. Check the boxes to enable modules or uncheck them to disable modules you don't need
  7. Click 'Save' to apply your changes

After saving, your selected PHP modules will become active on your domain. Changes usually take effect within a few moments, though occasionally it may take up to a few minutes for the new configuration to fully propagate.

Common PHP Modules and Their Uses

Here are some frequently used PHP modules you might need to enable:

  • mysqli or pdo_mysql - Required for MySQL database connections (WordPress, Joomla, etc.)
  • gd or imagick - Image processing and manipulation
  • curl - Making HTTP requests to external APIs and services
  • mbstring - Multi-byte string handling for international characters
  • zip - Creating and extracting ZIP archives
  • xml - Processing XML data
  • opcache - PHP performance optimization through bytecode caching

When to Enable or Disable PHP Modules

You might need to adjust PHP modules in several situations:

  • Installing a new CMS or application that requires specific extensions
  • Troubleshooting errors that mention missing PHP modules
  • Following software documentation that lists required PHP extensions
  • Improving security by disabling unused modules
  • Optimizing performance by enabling caching extensions

OBHost provides flexibility to customize your PHP environment to match your exact hosting requirements, ensuring your applications run smoothly.

Frequently Asked Questions

What happens if I disable a required PHP module?

If you disable a PHP module that your website or application needs, you may experience errors or broken functionality. Most applications will display error messages indicating which module is missing. You can simply re-enable the module following the same steps above to restore functionality.

Do I need to restart anything after changing PHP modules?

No, you don't need to restart any services. Changes to PHP modules take effect automatically within moments after saving your settings. Your website will immediately begin using the new configuration.

Can I enable different modules for different domains on my account?

The PHP module configuration in cPanel typically applies account-wide to all domains. However, you can select different PHP versions per domain using domain-specific settings if your hosting plan supports this feature. For domain-specific configurations, please contact our support team for guidance.

Which PHP version should I choose?

Choose the PHP version that your application or CMS officially supports. Most modern applications recommend PHP 7.4 or higher, but always check your software's documentation for specific requirements. Newer PHP versions generally offer better performance and security, but ensure compatibility first.

If you need assistance with PHP modules or have questions about which extensions your application requires, our support team is available 24/7 to help. Visit our contact page or email support@obhost.org for expert guidance.


Was this answer helpful?

« Back