Managing PHP Settings in cPanel (Firstserv Guide)
PHP is a widely used programming language that powers many modern websites and applications, including:
- WordPress
- Joomla
- Drupal
This guide explains how to manage your PHP settings in cPanel, including:
- Changing PHP versions
- Enabling or disabling extensions
- Adjusting PHP options
- Managing available functions
Important Before You Begin
- ✅ PHP settings apply to your entire cPanel account
- ✅ All domains (primary, addon, subdomains) share the same PHP configuration
- ⚠️ If you host multiple websites, test them all after making changes
👉 You can always revert to a previous PHP version if needed
Accessing PHP Settings
- Log in to cPanel
- Navigate to:
Software → Select PHP Version
Changing Your PHP Version
Step-by-Step
- Open Select PHP Version
- Click the current version (marked as “current”)
- Choose a new version from the dropdown
- Click Set as Current
Best Practice
- ✅ Use the latest supported PHP version for:
- Better performance
- Improved security
👉 Firstserv also provides older versions with security patches where required for compatibility.
Managing PHP Extensions (Modules)
What is a PHP Extension?
Extensions add additional functionality to PHP.
Example:
- Imagick → Image processing functions
- SOAP / DOM → Used by platforms like Magento
⚠️ Missing required extensions can cause your site to break
Enable / Disable Extensions
- Tick ✅ to enable
- Untick ❌ to disable
✅ Changes are applied instantly
Important Notes
- ✅ Only enable extensions your application requires
- ⚠️ Too many enabled extensions can reduce performance
- ⚠️ Some extensions may conflict depending on PHP version
Special Case
- IonCube Loader must be enabled for certain applications (e.g. WHMCS)
Changing PHP Options
Configure Common Settings
Switch to the Options tab to adjust values such as:
- memory_limit
- max_execution_time
- upload_max_filesize
- date.timezone
How to Edit
- Click the value to change it
- Select from dropdown or enter a custom value
✅ Changes are saved automatically
Tip
- Default values are suitable for most websites
- Only change settings if you have a specific requirement
Managing PHP Functions
Disabled Functions
For security, some PHP functions are disabled by default (e.g. exec, shell_exec, system).
How to Enable a Function
- Locate:
disabled_functions
- Remove the function from the comma-separated list
- Save the change
⚠️ Security Warning
- Only enable functions if absolutely necessary
- Incorrect changes can expose your site to security risks
👉 Most websites do NOT require changes to this setting
php.ini Files
- ⚠️ Custom php.ini files placed in your website folders are ignored for security reasons
- ✅ Use cPanel PHP Selector instead to manage settings
Checking Your Current PHP Configuration
To view your live PHP settings:
Step 1: Create a PHP Info File
Create a file called:
phpinfo.php
Add this content:
Step 2: Upload to Your Site
- Place the file in:
/public_html/
Step 3: Access It in a Browser
Visit:
https://yourdomain.com/phpinfo.php
✅ You’ll see full PHP configuration details
⚠️ Important
- Delete this file after use
- It contains sensitive server information
Summary
- Manage PHP via cPanel → Select PHP Version
- Choose a compatible PHP version for your site
- Enable only required extensions
- Adjust options carefully
- Avoid modifying disabled functions unless necessary
Need Help?
If you’re unsure which PHP settings your website requires, the Firstserv support team is always happy to help you configure everything safely.
