Articles on: Product Documentation

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


  1. 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.
  1. Locate the "MultiPHP INI Editor"
  • Once logged in, scroll down to the Software section
  • Click on MultiPHP INI Editor.
  1. Choose the Domain or Directory
  • Under the Basic Mode tab, select the domain or directory for which you want to edit php.ini settings.
  • A list of configurable PHP settings will appear.
  1. 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.
  1. Verify Changes

To verify that the changes have taken effect, create a PHP info file:

  • Open File Manager in cPanel.
  • Navigate to the public_html directory.
  • 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.php in 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:


  1. Open File Manager and navigate to the root directory of your website.
  2. Locate or create a php.ini file.
  3. Right-click the file and select Edit.
  4.  Add or modify PHP settings, e.g.:
memory_limit = 256M 
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
  1. Save the changes and verify using the phpinfo.php file.

Updated on: 12/01/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!