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.

RELATED:   Linux Hosting – From Corporation to Consumer

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:

RELATED:   How Will Parallels Plesk 12 Affect Web Servers?

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:

[code lang=”php”]memory_limit = 32M ; Maximum amount of memory a script may consume[/code]

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.

RELATED:   Hosting Providers Diversifying: NetGrey.com Takes the Lead

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.

How-to Start a Blog – Review of the Best 10 Blogging Platforms
How-to Start a Blog – Review of the Best 10 Blogging Platforms

If you want to start a blog as fast as possible, then you need to consider choosing a blogging platform. Thankfully, there are some excellent free and paid blogging platforms...

How Referral Marketing Can Benefit Web Hosts
How Referral Marketing Can Benefit Web Hosts

Even if the niche of web hosts are fully loaded with a lot of companies they are still one of the easiest to promote because you could write your own...

Broken Links: How to Find, Fix, and Benefit from Broken Links
Broken Links: How to Find, Fix, and Benefit from Broken Links

Links are what holds the web together. Essentially, the web is named as such because of the ability for pages and sites to link to other sources and relevant information....

Brand Value & the Most Powerful Brands (with Infographic)
Brand Value & the Most Powerful Brands (with Infographic)

Brand value – everyone wants it, however, only few are able to achieve it. The subject of “brand value” holds a significant position amongst marketers, executives, and entrepreneurs. Let’s discuss...

Reasons why your business should shift to Cloud hosting
Reasons why your business should shift to Cloud hosting

Cloud hosting has been on the rise since its inception. The improvement to your website performance and business efficiency that comes with Cloud hosting is almost tangible.

Why We Love the IT Support Career?
Why We Love the IT Support Career?

In almost all of my posts I was talking about the stressful side of the IT – the long hours, end user issues, migrations, midnight calls and the like. But...

IT Manager: Ways To Show Your Appreciation To Your Team
IT Manager: Ways To Show Your Appreciation To Your Team

Surely your team struggled hard and made things happen. You cannot say “this is what you get paid for” and just leave – you cannot keep your IT staff that...

Feeling Insecure In Your Current Job Position?
Feeling Insecure In Your Current Job Position?

Job security is one of our primary concerns. We everyday we live with the question of whether or not we will be working the next day. Loyalty is not the...

Leave a Reply

Your email address will not be published. Required fields are marked *