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

  1. Log in to cPanel
  2. Navigate to:
    Software → Select PHP Version
    

Changing Your PHP Version


Step-by-Step

  1. Open Select PHP Version
  2. Click the current version (marked as “current”)
  3. Choose a new version from the dropdown
  4. 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

  1. Locate:
    disabled_functions
    
  2. Remove the function from the comma-separated list
  3. 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:

 
 
 
 
 
 
PHP
 
 
<?php phpinfo(); ?>
 
 
 

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.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Managing Disk Usage in cPanel

Managing Disk Usage in cPanel (Firstserv Guide) Running low on storage can be stressful—but...

Get a free Let's Encrypt SSL for your website

An SSL (Secure Sockets Layer) certificate ensures that the connection between your website...

Importing Large MySQL Databases

Importing Large MySQL Databases (Firstserv Guide) If your database is too large to...

What happens if I exceed my disk space allowance?

Disk Space & Mailbox Usage (Firstserv Guide) Managing your disk space is essential to...

Backing Up Databases via SSH

Backing Up Databases via SSH (Firstserv Guide) This guide explains how to create MySQL...