Loading...

Knowledge Base
Categories: , , , ,

How to Increase PHP Memory Limit

Share

PHP installation comes with default settings and this is already good for some websites and website administrators. But some website needs more than the default amount of memory. If that’s the case, you can configure the PHP memory limit to cater to the need of your website. Sometimes you may see an error like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2515174 bytes)
in (file path) on line (0).

Continue reading this article to learn how to increase the PHP memory limit via your File Manager.

How to increase the PHP memory limit

As mentioned, you can fix a PHP: Fatal Error by increasing the PHP memory limit in your php.ini file. To do this, follow the steps below.

  1. Access your File Manager.
  2. Scroll to public_html folder and locate your php.ini file.
  3. Right-click on the php.ini file and click Code Edit. A pop-up window will appear, click Edit to continue to the editor page.
  4. Using the Code Editor, within the php.ini file, search for the following text:
     
    
        max_execution_time = 30
        max_input_time = 60
        memory_limit = 128M
    Increase the size of the memory_limit. The size is usually in megabytes.
  5. Click Save Changes.
  6. Reload/refresh your site and test if the increase in memory_limit is enough.
    If it isn’t, it is recommended that you increase the memory_limit value again until you find the size that will resolve the memory-related Fatal Error.

To learn how to make php.ini recursive, click the following guide:

Please let us know if you need any further assistance, or if you have any questions. We’d love to help!

Did you find this article helpful?

 
* Your feedback is too short

Loading...