Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes) Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes) php php

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes)


For 000webhost, you should be able to override php.ini values using a .htaccess file stored in your public_html.

I'm not sure what values they allow you to override, but to raise the memory limit to 128M (the standard, I presume it was lowered to 64M), try putting this in .htaccess;

php_value memory_limit 128M


If you don't have access to php.ini and updating .htacess file gives you Internal Server Error you could try to add this line in wp-settings.php

ini_set('memory_limit', '128M');


Changing the memory limit only hides the problem, it doesn't solve it.

You currently have 64MB of memory, which should be more than enough for your needs. If it's not, then there's almost certainly a leak in your code, or possibly an infinite loop.

Instead of trying to hide the error in a corner, try fixing it. Look at where the error happens, see if you can find what the "last straw" is that makes it exceed the memory limit.