I have two domains, webhosted on 000webhost. I installed wordpress on them and for some days it functioned well, but now it shows me the following error on both of them:
Go to wp-config.php file and put this code right under the very 1st php line (so this code will go on line 2 and 3)
//increase WP Memory Limit
define('WP_MEMORY_LIMIT', '256M');
If you are using GoDaddy you should check which php version is your hosting running.
Happened to me that I was running 5.2 when the latest available was 5.4.
You just have to log in to the hosting manager and check the version in Programming Languages.
GoDaddy seems to reduce the memory_limit value to 64M by default.
I had spend a day or two trying to increase the size, by changing the .htaccess file and php.ini file in the /public_html folder. But atlast I got the issue resolved as follows:
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
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.
its well-known error easy to solve just do simple editing wp-config.php
file
First, open your wp-config.php which is located in the root WordPress directory. Then add the following line inside the main php tag:
define('WP_MEMORY_LIMIT', '64M');
or change 64M to your need.