How to Manage PHP Versions
Last Updated: March 2026
3 min read
How to Manage PHP Versions
Different web applications require different PHP versions. cPanel allows you to easily switch between PHP versions and configure PHP settings for your hosting account.
Checking Your Current PHP Version
Via cPanel:
- Log into cPanel.
- Go to Software > Select PHP Version (or MultiPHP Manager).
- Your current PHP version is displayed at the top.
Via a PHP file:
- Create a file named
phpinfo.phpin yourpublic_htmldirectory with this content:<?php phpinfo(); ?> - Visit
https://yourdomain.com/phpinfo.phpin your browser. - Delete this file after checking — it exposes sensitive server information.
Changing PHP Version in cPanel
Using Select PHP Version (CloudLinux):
- Go to Software > Select PHP Version.
- Click the PHP version dropdown at the top.
- Select the desired version (e.g., PHP 8.1, 8.2, 8.3).
- Click Set as current (or it may apply automatically).
Using MultiPHP Manager:
- Go to Software > MultiPHP Manager.
- Check the box next to the domain(s) you want to change.
- Select the desired PHP version from the dropdown.
- Click Apply.
Configuring PHP Settings
Using Select PHP Version:
- Go to Software > Select PHP Version.
- Click Options (or Switch to PHP Options).
- Adjust common settings:
- memory_limit — Maximum memory a script can use (e.g., 256M)
- max_execution_time — Maximum script execution time in seconds (e.g., 300)
- post_max_size — Maximum POST data size (e.g., 64M)
- upload_max_filesize — Maximum file upload size (e.g., 64M)
- max_input_vars — Maximum number of input variables (e.g., 3000)
- Click Save or Apply.
Using MultiPHP INI Editor:
- Go to Software > MultiPHP INI Editor.
- Select Basic Mode or Editor Mode.
- Choose the domain to configure.
- Adjust settings and click Apply.
Enabling/Disabling PHP Extensions
- Go to Software > Select PHP Version.
- Below the version selector, you’ll see a list of PHP extensions.
- Check or uncheck extensions as needed:
- Common extensions:
mysqli,curl,gd,mbstring,zip,xml - WordPress typically needs:
curl,gd,mbstring,xml,zip,mysqli
- Common extensions:
- Click Save.
PHP Version Compatibility
| Application | Minimum PHP | Recommended PHP |
|---|---|---|
| WordPress 6.x | PHP 7.4 | PHP 8.1+ |
| Joomla 5.x | PHP 8.1 | PHP 8.2+ |
| Drupal 10.x | PHP 8.1 | PHP 8.2+ |
| Laravel 10.x | PHP 8.1 | PHP 8.2+ |
| Magento 2.4 | PHP 8.1 | PHP 8.2+ |
Custom php.ini
For more granular control, create a php.ini file in your public_html directory:
memory_limit = 256M
max_execution_time = 300
upload_max_filesize = 64M
post_max_size = 64M
max_input_vars = 3000
Troubleshooting
- Site broken after PHP upgrade: Switch back to the previous version and check compatibility of your application, plugins, and themes.
- Changes not taking effect: Clear your browser cache and any server-side caching. Try creating a
php.inifile in the specific directory. - Function not found errors: Ensure the required PHP extension is enabled.
For PHP-related assistance, contact 10Corp support.
Tags:
hosting
php
cpanel
php-version
configuration