How to Edit PHP Environment (php.ini) Values in cPanel
The php.ini file is the main configuration file for PHP settings on your web server. If you need to modify PHP settings, such as increasing the memory limit, max execution time, or file upload size, you can do so via cPanel. This guide will walk you through the steps to edit php.ini values in cPanel.
Edit php.ini in cPanel
- Log into cPanel
- Open your web browser and navigate to your cPanel login page (usually
yourdomain.com/cpanel). - Enter your cPanel username and password, then click Log in.
- Locate the "MultiPHP INI Editor"
- Once logged in, scroll down to the Software section
- Click on MultiPHP INI Editor.
- Choose the Domain or Directory
- Under the Basic Mode tab, select the domain or directory for which you want to edit
php.inisettings. - A list of configurable PHP settings will appear.
- Modify php.ini Values
- Locate the setting you wish to change (e.g.,
memory_limit,upload_max_filesize,post_max_size,max_execution_time) - Enter the desired value for the setting.
- Click Apply to save your changes.
- Verify Changes
To verify that the changes have taken effect, create a PHP info file:
- Open File Manager in cPanel.
- Navigate to the
public_htmldirectory. - Click +File and name it
phpinfo.php. - Edit the file and add the following code:
<?php
phpinfo();
?>
- Save the file and visit
yourdomain.com/phpinfo.phpin your browser. - Look for the modified values in the PHP configuration table.
Alternative Method: Editing php.ini via File Manager
If your cPanel does not have the MultiPHP INI Editor, you can manually edit the php.ini file:
- Open File Manager and navigate to the root directory of your website.
- Locate or create a
php.inifile. - Right-click the file and select Edit.
- Add or modify PHP settings, e.g.:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
- Save the changes and verify using the
phpinfo.phpfile.
Updated on: 12/01/2026
Thank you!
