PHP memory limit error

Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 23456789 bytes) in somefile.php

Fatal Error: PHP Allowed Memory Size Exhausted

These errors occur when PHP tries to process a large database record, or when importing or exporting a database.

To fix the problem, please modify the memory_limit line in php.ini to match this example:

memory_limit = 64M

We do set the maximum memory limit at 64 MB (67108864 bytes). If you want to go higher, you will need a VPS plan or dedicated server.

So, if you see "Allowed memory size of 67108864 bytes exhausted..." in the error, then you cannot increase the limit any higher without a VPS plan or dedicated server.

Article Comments

You should offer a tiered package which has a larger memory_limit and other associated values. Seems a bit much to go to a dedicated server just because memory_limit of 128M or 256M is required.

We have a new set of plans which falls between shared hosting and dedicated servers, which will satisfy your request.

The new type of hosting is VPS. You can read more about VPS at

J Chow
I'm seeing this error and the amount allocated is 63176704 bytes (hit by Wordpress image upload script, image.php line 147). I'd like to utiliize my limit of 67108864 but before I fill out a support ticket, isn't 63176704 bytes a somewhat arbitrary-looking value? Would a php.ini containing 'memory_limit = 64M' even help me in this case?

Sure, increasing the limit to the maximum 64MB will work because your 63176704 bytes is not the maximum.

You don't need a ticket to try this. You can create and edit your own php.ini file. Also, you can call us or join live chat to have an agent fix this immediately.

Nick Hughes
I am disappointed in the fact that 64MB is a inflexible limit for HostGator. I do not wish to pay 19.99 a month for a host when I can move to a competitor and have much more lenience.

I am being presented with this error when I am trying to run an install for SugarCRM. The CRM itself does not use this much memory but because I am unable to install my package I believe I will have to find a different host.

Can HostGator allow a memory change in order to install the package and once the package has been completed, then move the php.ini memory limit back down to its 64MB limit?

Please email so we can help you.

Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment