How to Increase the PHP Memory Limit (memory_limit)

Some PHP apps use a lot of memory, and might require you to increase the PHP memory limit (memory_limit).

This easy tutorial shows you how to properly change or increase the PHP memory limit (memory_limit) so that such PHP apps are able to function.

To change the PHP memory limit (memory_limit) correctly:

  1. Sign in to your HostM hosting account’s cPanel.

    Your cPanel access details are listed on the hosting account’s Info page in the Client Lounge.

  2. Click the Select PHP Version icon.

  3. Click the Switch to PHP Options link on the top right.

  4. Click the current value for 'memory_limit'.

    A drop-down menu should appear, containing a selection of different limits.

  5. Select the desired limit from the drop-down menu, then click the Apply button.

  6. Click the Save button at the bottom.

Your new PHP memory limit (memory_limit) should take effect immediately.

Be careful not to set the PHP memory limit (memory_limit) to a value that’s higher than necessary. A high PHP memory limit presents an unnecessary security risk, making it easier for malicious parties to conduct certain types of attacks against your websites.


Love our guides? HostM offers professional and helpful web hosting services with unlimited features and renewal rates that actually match our advertised rates.