Shared Hosting 4d ago 5 views 4 min read

How to enable or disable specific PHP modules in shared hosting

Learn the exact commands to enable or disable PHP modules on cPanel and Plesk shared hosting accounts without root access.

Roy S
Updated 8h ago
Sponsored

Cloud VPS — scale in minutes

Instantly deploy SSD cloud VPS with guaranteed resources, snapshots and per-hour billing. Pay only for what you use.

You will learn how to enable or disable specific PHP modules on shared hosting accounts using cPanel and Plesk. These steps apply to cPanel 118.x and Plesk Obsidian 18.x environments. You will manage extensions like GD, PDO, and Curl without needing root server access.

Prerequisites

  • A cPanel or Plesk shared hosting account.
  • Access to the control panel via web browser.
  • A domain name pointing to the hosting account.
  • Knowledge of which PHP extensions are required by your applications.

Step 1: Access the PHP Configuration Manager

Log in to your cPanel account and locate the "Software" section in the main dashboard. Click on the "Select PHP Version" or "Manage Modules" icon depending on your version. For cPanel 118.x, navigate to "Select PHP Version" under the Software section. For Plesk Obsidian 18.x, go to "Domains" > "Manage" > select your domain > "PHP Settings" > "Extensions".

Step 2: Enable a Specific PHP Module

To enable a module like GD or Curl, find the list of available extensions in the sidebar or main table. Locate the specific module you want to activate, such as "gd" or "curl". Click the checkbox next to the module name or click the "Enable" button. The system will process the request and apply the change to your account.

# cPanel Interface Example
# Locate 'gd' in the list and check the box
# Or click 'Enable' next to 'curl'
# Plesk Interface Example
# Click 'Enable' next to the extension name
# Status changes from 'Disabled' to 'Enabled'

You will see a confirmation message stating the module is now active. The change takes effect immediately for new requests.

Step 3: Disable a Specific PHP Module

To disable a module, find the extension in the list of enabled modules. Click the checkbox next to the module name or select the module and click "Disable". Confirm the action if a dialog box appears. The module will be removed from the active list and your application will no longer use it.

# cPanel Interface Example
# Uncheck the box for 'mbstring' or click 'Disable'
# Status changes from 'Enabled' to 'Disabled'
# Plesk Interface Example
# Click 'Disable' next to the extension
# Status updates to reflect the change

Step 4: Restart PHP-FPM (If Available)

Some hosting providers require a restart for changes to take effect. In cPanel, look for a "Restart PHP" button or reload the service. In Plesk, the changes usually apply instantly, but check for a "Apply Changes" button. If you see a "Restart" option, click it to ensure the new configuration is loaded.

Verify the installation

Create a file named info.php in your public_html directory with the following content to test the changes. Upload the file via FTP or the File Manager. Open your browser and navigate to http://your-domain.com/info.php. Look for the list of enabled extensions. Confirm that the module you enabled appears and the one you disabled is missing.


Search the output for the module name. If you enabled GD, you will see "gd" listed. If you disabled it, the entry will be absent.

Troubleshooting

Error: Module is greyed out and cannot be enabled. This happens when the module is not available in the package list for your PHP version. Contact your hosting provider to request the module be added to the pool or switch to a PHP version that supports it.

Error: Changes do not take effect immediately. This occurs because the PHP-FPM service has not reloaded. Click the "Restart" button in the interface or wait for the automatic reload cycle. Check the "Status" column to ensure the service is running.

Error: Application throws "Call to undefined function" after disabling. You disabled a module required by your code. Re-enable the module or update your code to use an alternative library. Review the error log in cPanel > Metrics > Error Logs for specific stack traces.

Error: Module list is empty or shows all as disabled. This indicates a permissions issue or a corrupted configuration file. Reboot the server via the hosting dashboard or clear the PHP cache in the control panel settings.

Sponsored

Powerful Dedicated Servers — Linux & Windows

Bare-metal performance with SSD storage, DDoS protection and 24/7 expert support. Ideal for production workloads, databases and high-traffic sites.

Tags: phpcPanelExtensionsshared hostingPlesk
0
Was this helpful?

Related tutorials

Comments 0

Login to leave a comment.

No comments yet — be the first to share your thoughts.