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.
ย
