Print This Post Chad A. Johnson

Overcoming the Wordpress “Fatal Error: Allowed Memory Size” Error

By Chad A. Johnson · June 3, 2009


If you are like me, you love Wordpress for it’s extendability. Through the use of plugins, new features and functionality can be easily added. Because of this, Wordpress is one of the best platforms to build a real estate agent website on.

While plugins can be a blessing, they also can cause problems with a website. This can come in the way of slow website performance or error messages.

One common error message experienced by those getting a bit “plugin happy” (activating a lot of plugins on a single Wordpress installation) is that of the “Fatal Error: Allowed memory size…” error.

Fatal Error: Allowed Memory Size

This error message is a result of Wordpress exceeding it’s predetermined memory limit. Activating several large, high-functionality plugins can easily cause this problem.

Luckily, there is an easy fix.

Wordpress sets its memory limits within the wp-settings.php file. All that has to be done is change the memory limit from “32M” to “64M”.

WP_MEMORY_LIMIT 32M

Here are the step by step instructions:

  • Open wp-settings.php in your favorite code editor. This file is in the root directory of your Wordpress installation
  • Go to line #13 of wp-settings.php and locate ‘32M’
  • Change the “32″ to “64″
  • Save the file and FTP it to your server

WP_MEMORY_LIMIT 64M

Once this is complete, you should have no problems activating those large plugins. Keep in mind that too many plugins can negatively affect website performance, so choose your plugins wisely and only add those that add value to the visitor experience.

For assistance with this or any other Wordpress website related issue or need, contact MyTechOpinion and our MTO Sites design team.

 

Share or Save

  • del.icio.us
  • StumbleUpon
  • Digg
  • Facebook
  • Twitter
If you enjoyed this post, make sure you subscribe to our RSS feed!

Related Posts


Comments

71 Responses to “Overcoming the Wordpress “Fatal Error: Allowed Memory Size” Error”
  1. Brendan Aiello says:

    Very Cool Way To Tweak Wordpress… Luckly the MTO Sites Squad manages my Team Blog and Personal Wordpress Based Real Estate Website, so I don’t have to worry about that stuff too much. I couldn’t be happier with the knowledge, know-how, design insights and customer service you guys provide me.

  2. Ben says:

    Thank you – that was the first time I have ever fixed any coding or errors myself! I did exactly what you asked and problem solved!

  3. Tanya says:

    Fantastic!! Thanks for the info – it helped me fix my site myself, always a great feeling for a noob. :)

  4. Matt Davis says:

    Thanks for the detailed info on how to fix that!

    I’m an idiot with code, so this kept me from breaking stuff!

  5. Chad, you rock!

    I was trying to auto-upgrade from WordPress 2.8.2 to 2.8.3 and kept getting the “Fatal Error: Allowed Memory Size” error.

    I found your blog post as result #5 on Google’s first search-results page after searching for “fatal error WordPress upgrade” (without the quotation marks).

    Wondering whether your tip would apply to WordPress upgrades, I made your recommended change — from ‘32M’ to ‘64M’ — and again tried the auto-upgrade, which then worked!

    Thank you!

  6. Kirk,

    Glad that the fix worked for you. It seems that the new automatic upgrade works like a built-in plugin.

    Remember that once upgraded, the wp-settings.php file will be replaced and will need to be tweaked again.

    Chad

    Connect with me: Twitter
    • Tracy says:

      Thanks for the memory tip. This also allowed me to get past the error when updating. I am glad you mentioned repeating the fix after upgrading.

  7. Martin says:

    I had to Google and try several tips but yours was very easy. Thank you for that. I thought I will have to reinstall Wordpress.

  8. Andy says:

    Thank You. You Da Man!

  9. Thanks! =)

    ‘Plugin Happy’ is a very apt description ;)

  10. Chris says:

    Thank you very much for posting this fix! It worked perfectly and saved me a lot of trouble. I’m not necessarily “plugin-happy”, but apparently the plugins I do have are taking up enough memory to cause a problem.

    Thanks for taking the time to post this information!

    Chris
    clarifile.com

  11. Steve says:

    THANK YOU!!!!!!!!!!!!!!!

    Walking through this has helped me in many ways – learning, for example, what a “code editor” is… lol!

    You’ve relieved me of a tremendous frustration and no small worry.

    Thank you again!

    Steve

  12. yoga pants says:

    Great read, i appreciate it.

  13. I like this page, thanks for a good read.

  14. Nate Gay says:

    Hey – Thanks a lot for the post! It helped a great deal!

  15. arnaldo says:

    Cara essa dica foi muito boa, parabens

  16. mike says:

    This is great, i had this fatal error notification for long , i kept on installing some new pluggins, it got to a point where i could’nt even gain access to my installed pluggins area, all i got was fatal error, now i with the 32 to 64 m change it’s all solved but now i’ve learnt i deleteed all unimportant pluggins to avoid problems…

    Thanks alot

  17. Wow I am very happy to see this post..
    Great work done…

  18. It is a great post I have seen..
    really a good work done..Keep it up….

  19. Thank you! I found several other solutions, none of which worked. This did work. No more error!

  20. wow thanks, i was kinda of working out why it was giving me a fatal error and this has helped fix it :D

    Thanks again! :D

  21. Online Car Insurance >> http://onlinecarinsuranceclaims.com/ says:

    [... - http://www.mytechopinion.com is another must see authority of information. Online Car insurance claims [… -

  22. JGhazally says:

    You are a life saver, just created a CSV import script and imported 2000+ pages into the wordpress site and it freaked out, thankfully this solved the problem! Thank You Thank You Thank You

  23. Apryle says:

    Super helpful. Thanks!

  24. portablejon says:

    too bad wordpress isnt set to do this by default, anyways thanks for the tip, do you happen to know if theres a plugin that does this automatically? ;) lol

  25. equitas says:

    Great tip but you shouldn’t really be changing wp-settings.php at all and you’ve no need to. In fact it says this at the top of the file.

    Wordpress config options can and should be set in wp-config.php. Simply add this to the bottom of your wp-config.php file and it will save you having to worry about wp-settings being reset on each upgrade as wp-config.php is not overwritten during upgrades

    /** Increase the Wordpress memory limit **/
    define(‘WP_MEMORY_LIMIT’, ‘64M’);

    Hope this helps

  26. Eugenijus says:

    Thank You, it helped me very much!

  27. Kyle says:

    So helpful, thanks!

  28. Awesome! Thanks a lot for your help!

  29. JG Ballard says:

    This is a great tweak, I was unfortunate enough to have it happen with only seven plugins! One of them seems to be very hungry.. Thanks

  30. Nick says:

    Thanks for the helpful info I’ve been pulling my hair trying to figure out how to fix this problem.

  31. duane says:

    Thank you! I was about to pull my hair out!

  32. AWESOME!

    I asked about this on Aardvark and got a response pointing to your post here. Thanks so much. I’ve had to juggle plugins just to upgrade my WP installation for a couple of the smaller revisions. Thanks for saving my ass! =]

    -@JoshuaGuffey

  33. ????? says:

    thanks
    this fatal error was killing me

  34. Perfect, fixed my ongoing wordpress problem. Thanks a million.

  35. gw says:

    AWESOME !!! thanks for the tip

  36. Jeremy Burns says:

    Thank you, great tutorial. It took about 30 seconds with your instruction to fix a problem that was driving me crazy for the past 20 minutes!

  37. lynette says:

    How and Where do I get to the wp-settings.php file? :(

    Will very much appreciate your help!!

    • WP-Settings.php is a core Wordpress file. It will be in the root directory of your Wordpress installation.

      Connect with me: Twitter
      • lynette says:

        Thanks for your prompt response!!:)
        Root directory is accessed from?? I’m sorry I’m rather lost here :(

        • You will need to access the Wordpress files using an FTP program and a code editing program. When modifying these core files, you need to be very, very careful. Wrong changes can break Wordpress.

          Connect with me: Twitter
          • lynette says:

            Not possible accessing from wordpress itself?? :X is the code editing program provided by webhosts?? Oh gosh. It sounds way complicated from here :/

          • At this point, it is probably best that you call in a professional Wordpress developer. It is an easy fix, but it you aren’t familiar with accessing Wordpress outside of the Wordpress admin, it is a bit out of your realm. Our web design team may be a good option for you.

            Connect with me: Twitter
  38. Mike Wade says:

    Thank you very much! I’ve installed several iterations of WP and never had this error, so I had no idea where to look. Other sites stated that you would have to modify your php.ini file, which many of us don’t have access to if we are using a shared web service.

    The fix took 30 seconds. THANKS AGAIN!!!

    -MEW

  39. Carlos says:

    THANKS! THANKS! THANKS! THANKS! THANKS!

  40. Paul says:

    Can anyone help me fix the fatal error on the bottom of our wordpress site?

    Thank you!
    Paul

    http://www.iintoa.com

  41. balbina says:

    asdfggh

  42. Noel says:

    Thanks a gazillion!

  43. Mark says:

    It doesn’t work for me. Is there any other solution?

    Thanks

    • You can define the limit in the WP-Config.php. This does the same thing, so it may not work for you. The problem may be a web host limitation on memory usage. You may need to remove plugins or switch web hosts.

      Connect with me: Twitter
  44. Mark says:

    I was editing the wp-config instead of settings. As soon as I realised my error and edited the right file it worked. Cheers.

    I’m wondering do you know how to add thumbnails for popular and recen posts like on speckyboy.com at the bottom.

    I’ve been looking all over for how to do this to add it to my cheat sheet with no success :-(

    Once again thanks for your repsonse.

    • Looks like they are using custom fields for the images rather than the built-in thumbnail feature in Wordpress. This is beyond covering in a comment. If you would like, our development team could add that feature to your site.

      Connect with me: Twitter
      • Mark says:

        It’s for my team because we want to learn a way to do it so we can also develop a plugin.

        We are just a team of friends with varied knowledge levels that we are constantly improving on.

        Would be great to get it done for us but then we won’t learn how to do it. Though thanks for the invitation.

  45. I think this has now changed in Wordpress 3 beta. I’m getting this error “Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes)…” when attempting to view forums on my 3.0 beta2 install running BuddyPress.

    Any insight would be greatly appreciated. Thanks! =)

    -@JoshuaGuffey

  46. no help says:

    this helped some but did not totally stop the problem.

  47. Glenn333 says:

    Thank you. This is better advice than on the buddypress wordpress forum and more importantly it works!

  48. thanks, that worked!

  49. Thanks!
    It solved the problem very nicely on my digital media blog BetaTales (http://www.betatales.com)!

    John

Trackbacks

Check out what others are writing about this post...
  1. [...] I typed the error message into “the google” and came across Chad Johnson’s excellent post on how to fix the problem. You should read the full write-up over here, but here’s the quick [...]

  2. [...] Overcoming the Wordpress “Fatal Error: Allowed Memory Size” Error | MyTechOpinion.com – [...]

  3. [...] article helped me resolve the issue. Just by changing one number in one of the WordPress files, the problem [...]

  4. [...] If, as I kept getting this week, you get the WordPress ‘Fatal Error: Allowed Memory Size’ error, here’s what to do! [...]

  5. [...] Overcoming the Wordpress “Fatal Error: Allowed Memory Size” Error [...]

  6. [...] En wat doe je in zo’n situatie? Googlen op de foutmelding toch? Dat leverende direct goed resultaat op. Een incidenteel bezoekje aan een site waar ik de oplossing voor mijn probleem vond. En een paar [...]

  7. [...] “out of memory” así que me puse a buscar la solución por internet, encontré dos variantes o Modificar el wp-settings para darle mas memoria o Añadir un php.ini con mas [...]

  8. [...] Overcoming the WordPress “Fatal Error: Allowed Memory Size” Error | MyTechOpinion.com [...]



Share your thoughts...

If you want an avatar or to include your social profiles join our Facebook community. You can also edit your profile and add your favorite networks.



« Back to text comment
Bottom