Cyber Week Deals! Save 80% on all Shared Hosting Plans & Locations - Starting from $1.99/mo

How to Change the Max Memory and Max Upload Limit

Updated on Nov 7, 2022

There are certain scenarios when you may be asked to make changes to your PHP configuration. Specifically, you may be directed to edit a file on your server called php.ini, and to increase the PHP Memory limit (memory_limit), or the PHP Upload limit (upload_max_filesize).

This post includes:

How to Increase the PHP Memory Limit

The memory_limit is a setting managed through the PHP Options, which max amount of memory a script may consume. This value should be set at least as big as post_max_size.

While we do not allow direct changes to php.ini on our servers, PHP configuration changes can be made from cPanel by following these steps:

  • Log into cPanel;
  • Look for the Software section and click on Select PHP version:

Find the PHP Selector in cPanel

The PHP Selector is not included by default in cPanel and might be missing from your account if your host is not FastComet. If that's the case, you should contact your web host.

  • In the new window click on Options:

Switch to PHP Options

  • Locate the memory_limit and click on the dropdown menu beside it. The menu will allow you to change the value as required. Check your script, plugin, or theme's requirements and use the correct value.
  • After you did the change, the new value will be automatically updated. If you were successful, you will see a green box at the top-right corner of your screen with a message that confirms the change has been auto-saved.

That's how you increase the PHP memory limit in cPanel.

How to Increase the PHP Upload Limit

The steps you need to follow here is similar:

  • Log into cPanel;
  • Click on Select PHP version:

Find the PHP Selector in cPanel

  • Click on Options:

Switch to PHP Options

  • Locate the upload_max_filesize and click on the dropdown menu beside it. The menu will allow you to change the value as required.
  • Again the new value will be automatically updated. If you were successful, you will see a green box at the top-right corner of your screen with a message that confirms the change has been applied.

That's how you increase the PHP upload limit in cPanel.

Final Thoughts

Change the memory_limit and upload_max_filesize only when you absolutely need to. When it comes to access, it's best to keep everything as strict and minimal as possible.

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

SSD Cloud Hosting

  • Free Domain Transfer
  • 24/7 Technical Support
  • Fast SSD Storage
  • Hack-free Protection
  • Free Script Installation
  • Free Website Transfer
  • Free Cloudflare CDN
  • Immediate Activation
View More