How can I change PHP settings? How can I increase the file upload limit or memory limit of PHP?

Changing PHP settings

You can find various PHP settings in cPanel under MultiPHP INI Manager, located under the Software section. PHP settings can be set per webroot, ie per domain or subdomain. The MultiPHP INI Manager allows you to change settings such as memory limit, file upload limit, error display, etc.

Increase or decrease the file upload size limit

The default limit for file uploads is 64 MB. If you need to upload larger files, follow these steps:

  1. Open cPanel ( yourdomain.com/cpanel )
  2. Navigate to MultiPHP INI Manager under the Software section
  3. Choose the appropriate domain from the dropdown, or select Home Directory to apply settings globally
  4. Find the row upload_max_filesize and change the value as needed. Use M to indicate megabytes, or G to indicate gigabytes. (e.g. 100M = 100 MB)
  5. Find the row post_max_size and change it to the value of upload_max_filesize + 4M. For example, if you set the maximum upload filesize to 100M, set post_max_size to 104M. post_max_size should always be higher than upload_max_filesize, otherwise uploads may fail.
  6. Press Apply

Increase or decrease the memory limit

If you are using memory-intensive applications, such as Wordpress with Elementor or other resource-heavy plugins, you may find that some pages fail to load or load slowly. To fix this, increase the PHP memory limit. By default, the memory limit is set to 128MB, which should be sufficient for nearly all use cases, but in rare cases you may need to increase it.

To change the memory limit, do as follows:

  1. Open cPanel ( yourdomain.com/cpanel )
  2. Navigate to MultiPHP INI Manager under the Software section
  3. Choose the appropriate domain from the dropdown, or select Home Directory to apply settings globally
  4. Find the row memory_limit and change it to an appropriate value, e.g. 256M. Use M to indicate megabytes, or G to indicate gigabytes. (e.g. 100M = 100 MB)
  5. Press *Apply

Note that you cannot allocate more memory to PHP than the limits set by your hosting plan. Setting the memory limit to an arbitrarily large number will not improve the performance of your site, nor will it allow PHP to use memory up to the limit. If you find your site needing more memory than allowed by your plan, you might need to upgrade to a higher plan.