How to Increase PHP Memory Limit, Max Upload Size & Execution Time in cPanel
In a PHP website, such as a WordPress or Joomla website, or a Laravel PHP framework website, you can face certain restrictions at times that can affect a website’s performance. These can be errors such as allowed memory size exhausted, file exceeds upload_max_filesize directive, or a script timing out before completion.
These are linked to PHP configuration parameters, including memory limit, maximum upload size, and maximum execution time. Each parameter needs optimal configuration for your site to handle larger files, run heavy scripts, and prevent interruptions during critical actions like uploading and importing databases.
Understanding Key PHP Settings
Prior to making any changes, it is necessary to understand the use of each PHP configuration option:
- PHP Memory Limit (memory_limit): Specifies the amount of memory that PHP scripts are allowed to use. Setting low values of memory limit can generate errors when large plugins, themes, or resource intensive scripts are executed.
- Max Upload Size (upload_max_filesize & post_max_size): This determines the maximum file that can be uploaded to your site, and is essential for media, themes, and plugins.
- Maximum Execution Time (max_execution_time): This setting determines how long PHP should run before timing out on a script. This must be raised if database import operations or file uploads take place because it prevents script timing-out occurrences.
Increase PHP Limits with MultiPHP INI Editor
You can make changes in PHP configuration with ease using MultiPHP INI Editor in cPanel.
For updating PHP settings, follow these steps:
- Login to your cPanel account.
- Move to the Software section and click on MultiPHP INI Editor.

- Select the domain on which you want to work from the drop-down list.

- Modify the following values for Basic Mode:
- memory_limit → e.g., 256M or 512M
- upload_max_filesize → e.g., 128M
- post_max_size → equal to or greater than upload_max_filesize
- max_execution_time → e.g., 300 or 600 seconds
- Click Apply button to save changes.

Tip: Choose values suitable for your hosting plan to avoid overloading server resources.
Common Errors and How to Fix Them
These are some common errors that show up on your website if your PHP configuration settings are too low. This is how you fix them:
- Allowed memory size exhausted
- Cause: The value of memory_limit is set too low for the scripts, plugins, and themes that are running.
- Solution: Raise the memory_limit value using the MultiPHP INI Editor within cPanel.

- File exceeds upload_max_filesize directive
- Cause: Upload-max-filesize is set to a lower value than the file you are attempting to upload.
- Solution: Both upload_max_filesize and post_max_size should be increased for larger uploads.

- Maximum execution time exceeded
- Cause: The max_execution_time parameter is inadequate for the process (e.g., file uploads, importing databases).
- Solution: Increase the max_execution_time setting using MultiPHP INI Editor.

Tip: Once modified, check your PHP configuration by inspecting the php.ini, user.ini, and .htaccess configuration files to make sure the values are updated correctly.
Verifying Changes
PHP settings must be checked to ensure the changes actually took effect. This can be done through cPanel file manager:
- Navigate to your cPanel dashboard by clicking on cPanel in the sidebar.

- Go to the Files area and select the File Manager.

- Open the directory of the domain which you have updated.

- Within the folder, you will notice essential configuration files like user.ini, php.ini, and .htaccess.

- If the user.ini or .htaccess files are not visible, click the Settings button located in the top right-hand corner and select Show Hidden Files (dotfiles) from there and click Save.


- Open user.ini, php.ini, and .htaccess to check if the memory_limit, upload_max_filesize, post_max_size, and max_execution_time values have changed to what you updated them to be.
- To open these files, right-click on them and select View.


Tip: It is essential to confirm these files because this ensures your PHP configuration is in place.
To ensure the efficiency of your website, it’s important to consider the best practices when it comes to adjusting the PHP settings for your website. You must set the PHP settings to the most suitable values considering the website hosting plan, check the effects of adjustments, and create back-ups of important files in the website when adjusting the PHP settings. If there are limitations you cannot raise on your own, contact our hosting support through WhatsApp or support ticket assistance so they may help you set up safe and optimal values.













