How to Manage and Update PHP Settings in cPanel
Summary
This guide explains how to view and change your PHP version, adjust PHP configuration options, and manage extensions using cPanel's MultiPHP Manager and MultiPHP INI Editor. These tools help you optimise performance, improve compatibility, and troubleshoot issues with PHP-based applications.
- Understanding PHP Management in cPanel
cPanel provides two main tools for PHP configuration:
- MultiPHP Manager
Used to change the PHP version for each domain. - MultiPHP INI Editor
Used to adjust PHP settings such as memory limits, upload sizes, and execution time.
These tools allow you to customise PHP behaviour without editing configuration files manually.
- Changing the PHP Version (MultiPHP Manager)
Different applications may require different PHP versions. To update the version for a domain:
- Log in to your cPanel dashboard.
- Scroll to the Software section.
- Select MultiPHP Manager.
- Tick the domain you want to modify.
- Choose a PHP version from the dropdown menu.
- Click Apply.
Your domain will now run on the selected PHP version.
When to change PHP versions
- Your CMS or plugins require a newer version.
- You need compatibility with older scripts.
- You want performance improvements or security updates.
- Editing PHP Settings (MultiPHP INI Editor)
The MultiPHP INI Editor allows you to adjust common PHP configuration values.
- Go to the Software section.
- Select MultiPHP INI Editor.
- Choose the domain you want to configure.
You will see a list of editable settings.
- Common PHP Settings You May Need to Adjust
memory_limit
Controls how much memory a script can use.
- Example: Increase to 256M or 512M for large CMS sites.
upload_max_filesize
Maximum size of uploaded files.
- Increase if you need to upload large media files.
post_max_size
Must be equal to or larger than upload_max_filesize.
max_execution_time
How long a script can run before timing out.
- Increase for long-running imports or backups.
max_input_vars
Controls how many form fields PHP can process.
- Useful for large menus or theme settings in CMS platforms.
After making changes, click Save.
- Managing PHP Extensions
Some applications require specific PHP extensions, such as cURL, mbstring, or intl.
To manage extensions:
- Open MultiPHP INI Editor.
- Scroll to the bottom of the page.
- Look for the Editor Mode section.
- Enable or disable extensions by adding or removing lines such as:
extension=intl extension=mbstring
Note: Some hosting providers manage extensions automatically, so availability may vary.
- Resetting PHP Settings
If you make changes that cause errors, you can reset the configuration:
- Open MultiPHP INI Editor.
- Choose the domain.
- Click Reset to Defaults.
This restores the default PHP settings for your hosting environment.
- Troubleshooting Common PHP Issues
Website Shows a 500 Error
- PHP version may be incompatible.
- Try switching to a different version.
- Check error logs for details.
Uploads Not Working
- Increase upload_max_filesize and post_max_size.
- Ensure your CMS settings match the new limits.
Scripts Timing Out
- Increase max_execution_time.
- Optimise the script if possible.
Missing PHP Extensions
- Enable the required extension in the INI Editor.
- If unavailable, contact support.
Changes Not Taking Effect
- Clear your CMS cache.
- Restart any caching plugins or modules.