Fix wordpress fatal error allowed memory size exhausted
Fatal error: Allowed memory size of …… bytes exhausted (tried to allocate …. bytes) in home/of/some/thing/fishy.php
![]()
I experienced this weird Wordpress or rather PHP error last night when trying to view my blog when i got home, at first i thought that there was a technical problem at my server so i waited, then i waited and waited and waited again for almost 7 hours then i cant wait no more i want to blogggg… so i contact my hosting provider and they told me that there is nothing wrong with the server nahhh WTF! i told to my self. .
but i cant figure out the problem at first. .then i figure out that i can access other part of my site. .so i said to myself.. hmm maybe its because of the plugin that i last installed so again i waited and let the night past but the error was still there when i woke up. .did you know what did i do? haha call me dumb coz i dont know what to do so i decided to delete my blog files and install wordpress again but ofcourse i backed up my database so i can restore. . but the problem is still there nahh WTF again i said to my self. . haha
until i found a bit of code that can save my life sana haha
. . PHP Memory Allocation Error was the real problem it is an error returned by php when it used up the default memory limit, it occurs when PHP is handling or processing a large amount of data or records more that its default memory allocation. I found to 3 ways to Fix this problem
1st: Increase the memory limit of an individual PHP file
ini_set(”memory_limit”,”16M”);
Put this code at the top of every PHP file that errors are showing, you can expand the memory by changing the 16M to a other value if your still getting errors,. you can set it to 16M, 18M etc..
2nd: edit your PHP.INI file – this option will apply to all the php files in your site
search your php.ini file and find memory_limit: put values like at the top for example
memory_limit: 16M
3rd: use .htaccess to expand the memory allocation – this option will apply to all the php files in your site
php_value memory_limit 32000000
Copy and paste the code above to your .htaccess file
Thats it! the errors are gone
Tags: blogging, PHP, PHP Tutorials, Tips and Tutorials, wordpress


Hi everyone im 






October 25th, 2008 at 2:12 am
Nice!
Niligtas mo buhay ko!
Nabigla nalang talaga ako kahapon nang biglang naglabasan ang mga walang kwentang error message na fatal error: blah blah blah…
Tsk, tsk… Pero nalilito pa rin ako. Kasi, sa isang blog ko, pag-ina-access ko pa lang ang site, andun na agad ‘yung error. Sa kabila naman, lumalabas lang kapag nag-la-login ako. Tapos nag-install ako ng bago para malaman kung ano ba talaga. Ok naman kaya tuluyan talaga akong nagtaka kung anong problema ‘dun sa dalawa, hanggang sa nakarating ako sa post na ‘to. Bakit kaya bigla nalang sumusulpot ang error na ‘to at bakit hindi consistent? Wala na ba talagang pagkakataon na maibalik sa dati ang isang WordPress blog na nagkaroon ng ganitong error maliban nalang kung gagamitan ng isa sa tatlong solusyon na ‘yan? (’Yung ikatatlo pala ‘yung ginamit ko.) Meron ba talagang php.ini na file? Di ko kasi makita e. At wala kayang side-effect ang paglalagay ng dagdag linyang ‘yan sa .htaccess?
Hala, pasensya na. Sobrang na-overwhelm ata ako kaya napuno ng tanong. Muli, maraming salamat!
Nelson’s last blog post..Virus from Surigao
Reply
Daniel Dumas (79 comments.) Reply:
October 25th, 2008 at 2:26 am
hehe teka nalito ko sa una kong sasagutin na-overwhelmed nadin ako
hehe. .ahmm sa una mong tanong talagang dadating ata talaga sa wordpress blog yan kapag maraming plugins na gamit kasi sabay2 yung mga yun na gumagamit na memory ng PHP eh. .so mageeror talaga. .pwera nalang kung well written siguro yung php file para di mag-error. . sa pangalawang tanong mo naman about PHP.INI yup meron yan ask your host about it kasi sila ang may control nito. .at sa pangatlo wala naman siguro kasi yung code is ganun din naman yung function iiexpand nya ung memory allocation ng php thru your server actually yung 3rd din ang ginamit ko
Reply
October 25th, 2008 at 3:50 am
I bookmarked your blog, thanks for sharing this very interesting article
Reply
Daniel Dumas (79 comments.) Reply:
October 25th, 2008 at 4:58 pm
yeah sure thanks and your welcome also
Reply
October 25th, 2008 at 3:38 pm
hi there thanks for this post you saved my life it did happened to my wordpress blog too thanks u very much!
Reply
Daniel Dumas (79 comments.) Reply:
October 25th, 2008 at 5:01 pm
oh thats nothing
you’re welcome!
Reply
March 14th, 2009 at 8:19 pm
I must say, I could not agree with you in 100%, but it’s just my IMHO, which indeed could be very wrong.
p.s. You have a very good template . Where have you got it from?
Reply
June 16th, 2009 at 7:52 pm
tulong please… parehas tayo ng sitwasyon. Naaaliw ako sa paglagay ng plug ins, ng nainstall ko ung nvoice na plugin tas nagcrash na yung wordpress ko… nag fatal error nah, di ko alam ung gagawin wala akong back up file sa mga blog na yun, importante pa naman ung mga blogs ko kasi about sa work koh un, sana matulungan mo ako, kung pano maretrieve ung wordpress kuh,
“Fatal error: Class ‘SoapClient’ not found in /usr/www/virtual/usdbet/www.anesthetic-cream.com/wp-content/plugins/nvoice/NVoice.class.php on line 16″
ganyan ung nakalagay, di ko alam kung panu ko ayusin o maibalik sa dati, nasabi moh na naibalik mo ung sa iyo, good for you, ako di ko lam kung panu sana matulungan mo ako, please guide me, iemail mo ako dito sa merykha@gmail.com, at eto nga pla ung fatal error na site koh, http://www.anesthetic-cream.com/, please help, i really need it back.. as soon as possible, mabawi ko lng yun magdedelete tlga ako ng plug ins… tiwala akong matutulungan mo ako.. salamat…
Reply