Get Out of the PHP Memory Error Rut with WordPress



error

We’ve all been there: You drag yourself out of bed in the morning, crawl to your computer, and boot up the oh-so-familiar blog space. But instead of finding your lovingly crafted website, complete with self-made logos and beautiful banners, all you find is this error:

Fatal error: Allowed memory size of ######## bytes exhausted (tried to allocate ## bytes) in /home/user/public_html/wp-includes/phpfile.php on line 80.

Before you start swearing at your monitor or worse—we’re thinking that stapler looks appropriately weighted for some hefty hucking—know that this issue is easily fixed, and doesn’t have to be the day-wrecker you feel it might be.

It’s worth noting that your exact error message may vary, but as long as it says something about your memory being more worn out than an obese man at a 10k, you’re golden: The issue has to do with available computing space, and you’re still reading the right tutorial.

The likely issue is that you’ve just installed a new plug-in or extension, and now WordPress is acting like an estranged lover. There are a couple of ways to correct the issue. The easiest is to disable any recently installed extensions and see if that corrects the problem. However, this is certainly less than desirable, as you likely want that new piece of code. With that in mind, you might try to expand the available memory space for your site. This can be accomplished in the following way:

Essentially, you’ll need to change the amount of memory available for PHP. This can be done in a number of ways, and it might be that there’s only one that works for your server. Always query your web host first—or if you’re feeling gung-ho, locate your php.ini file and do this to it!

Locate the following line:

memory_limit = 32M ; Maximum amount of memory a script may consume

Change “32M” to “64M,” and then cross your fingers. Some hosts limit the amount of memory you can delegate yourself to PHP, so if this doesn’t correct the issue, therein may lie your problem. If you can’t acquire access to php.ini, you might try adding the same line to the .htcaccess file in your WordPress main installation folder.

If none of those are possible, then you’re in a sticky boat, Pilgrim: Call up the tech-support you’re paying for and get them to do one of the things we just discussed.

Tags: , , , , ,

The Beauty of Cheap Web Hosting

web hosting

It seems as if everyone is working on a tighter budget these days.  Harsh economics times have not only affected consumers, but also caused several organizations to the rethink the significance of budgeting.  As elementary as it may seem, this presents...

Jan 9th, 2009 Read more

Stay in Touch with the Geeks

Our Community

Facebook
2274 Fans
Twitter
1422 Followers
FeedBurner
60 Subscribers

Submit News

Do you have an exciting story and want the world to hear it?

Submit a Story

  • 15K monthly visitors
  • PageRank 6
  • Alexa 11,000