Introduction
On cPanel servers, PHP INI settings can be adjusted with multiple methods. This guide will describe the available options.
Procedure
The steps for cPanel and WHM are very similar. The main difference is WHM controls all PHP versions while the cPanel interface only controls one account. Basic mode allows you to edit the most common options, while Editor mode allows you to set any option by editing the php.ini.
For cPanel users:
1. Log in to cPanel as the cPanel user.
2. Navigate to MultiPHP INI Editor
3. Select Basic or Editor mode, depending on which options you want to modify.
- Basic mode:
4. Adjust the values to meet your requirements.
5. Click "Apply" at the bottom.
- Editor mode:
4. Apply your preferred values to meet your requirements.
5. Click "Save" at the top right.
For WHM users:
1. Log in to WHM as root or a reseller user.
2. Navigate to MultiPHP INI Editor
3. Select Basic or Editor mode, depending on which options you want to modify.
- Basic mode:
4. Choose the PHP version.
5. Adjust the values to meet your requirements.
6. Click "Apply" at the bottom.
- Editor mode:
4. Choose the PHP version.
5. Apply your preferred values to meet your requirements.
6. Click "Apply" at the bottom.
Our documentation on the MultiPHP INI Editor interfaces in cPanel can be found below:
MultiPHP INI Editor for cPanel
Each installed PHP version will have its own php.ini file. Admins or SSH users can modify the files manually at the below paths.
Note: 'xx' would need to be replaced with the version number (ex. ea-php74 for PHP 7.4).
Path: /opt/cpanel/ea-phpxx/root/etc/php.ini
For versions that use PHP-FPM, a restart may also be required. You can restart Apache PHP-FPM using the script below.
/scripts/restartsrv_apache_php_fpm