WordPress Upgrade Error Allowed Memory Size Exhausted

WordPress version 2.8.2 came out very soon after 2.8.1, and might have been done so hastily in order to address some security settings. It seems a new problem has been pretty common with the automatic upgrade feature of WordPress 2.8.1.

When trying to automatically upgrade a blog from 2.8.1 to 2.8.2 it wouldn’t work and I saw an error message similar to this: Allowed memory size of 33554432 bytes exhausted. It seems the error is pretty common and I found the solutions on the WordPress.org support forums. In my case it was an active plugin causing the problem. I started deactivated one plugin at a time and trying the automatic upgrade after each one. It wasn’t until the 8th deactivated plugin, Contact Form, that the automatic upgrade worked.

So if you are getting the same type of error you most likely have an offending plugin or group of plugins and I suggest deactivating all plugins before the upgrade. You can also try what I did and see what plugin is causing the problem. Keep in mind it might not be just the last deactivated plugin but the combination of two or more plugins.

Another solution that I didn’t try but others have had success with is increasing the WordPress memory limit. To increase the memory limit add this bit of code in the wp-config.php file right after the opening php statement:

define('WP_MEMORY_LIMIT', '64M');

If you don’t know how to edit a core WordPress file, sorry I am not going to get into it in this post and I suggest you stick to the deactivating plugins solution or check out more on the topic at the WordPress.org Forum.

Similar Posts:



Tags:

If you liked this post, feel free to leave a comment that is relevant to the post or subscribe to the feed and get future articles delivered to your feed reader.

Sorry but due to the spamming of a few all comments are moderated and will appear when approved and all drive-by comments will be deleted!

Comments

nowander i have problems with my wordpress lately..gosh thanks for the information

Reply

hey thanks for this trick ……..i spend my 6 to 7 hr. to get updated but fail due to same problem ……… but i think now i can do it ………. thanks

Reply

Thanks. I had encountered this problem, somehow resolved it but wasn’t sure how. After reading your post, the problem recurred and I was glad to be able to reread what you wrote, disable COntact 7 form plugin and automatically upgrade the plugin that needed updating.

Reply

Thanks for the heads up. I always deactivate all of my plugins before upgrading. Tweetmeme gave me some issues so I just have kept that plugin deactivated for a few days now and just reactivated it tonight. (Giving the developers time to fix the bug)
Thanks for sharing,
Eren Mckay

Reply

Plugin incompatibility can drive one crazy! Same sort of thing happened to me a while back. Only thing did was deactivate ALL of my plugins and then re-enabled them one at a time. Not terribly efficient but effective!

Reply

WP_MEMORY_LIMIT is the miraculous “law”, thx a lot :)
But there can’t be another memory problems with WP later?

Reply

Jeff  Replied:

There are always potential problems in the future.

Reply

hey, thank you so much. the line with “define(‘WP_MEMORY_LIMIT’, ‘64M’);” worked for me.
10x again!

Reply

That happened to me. Changing from 2.8.1 to 2.8.2 i kept on getting error messages. It becomes so frustrating i had to let it go for a number of months. Perhaps at this point, i will work on deactivation plugins first. Thank you for the tip.

Reply

double thanks!.. works a treat now! :D

Reply

I just did my first WP 2.8.3 upgrade last night and I must have lucked out not doing some of my 8.2 upgrades. the 2.8.3 was solid.

Reply

Very interesting. On several occasions, I’ve tried using the automatic upgrade and failed every time. Next time I run into this, I’ll see if I can fix it myself by deactivating plugins. Thanks for posting this. It gives me a little bit better insight into of wordpress operates.

Reply

I have had this happen with previous upgrades too – or I have had too many plugins across too many sites at one time (?)

Pretty quick fix though and not too difficult. it did say on one of the fixes that your webhost might not appreciate this change – anyone had any problems like that?

Also had “my link order” plugin break across all my sites the last 2 times I upgraded. There is a fix for that now where it auto patches itself but caused me a couple of days of pain until I figured out how to fix it….

It´s a hard life for us Wordpress Newbs!!

Reply

i’ll be glad when 2.8 is stable, it is really nice but there are some glaring problems they need to hook upfirst.

Reply

Excellent update… I don’t update my blogs enough, that will be on my to do list this weekend.

Reply

This useful technique in handling WP problem like this one. I bet there would be future problems that WP users must know to solve.

Reply

I’ll see if I can fix it myself by deactivating plugins.thanks for posting really very interesting post.

Reply

“So if you are getting the same type of error you most likely have an offending plugin or group of plugins and I suggest deactivating all plugins before the upgrade.”

I was just about to upgrade when I stumbled upon your post. This will really save me from headaches if and when an error occurs. Thanks a lot.

Reply

Ho much may I increase this size ?

Reply

Jeff  Replied:

I don’t know, why not try as much as you want.

Reply

Well I commented before that this was a quick and easy fix but for some reason it has started again.
Mainly when I try to use the auto upgrade feature built into Wordpress.
I also have an auto upgrade plugin which I can still use to upgrade – good thing I didnt delete that one although I thought it was obsolete.

Any ideas as to why my allocated memory keeps resetting itself back to 32M?

Reply

Jeff  Replied:

No.

Reply

Brent2  Replied:

Check with your hosting company. It’s possible they have a default php.ini file or a php.ini file that needs to be in multiple directories. Some even have a setting allowing the same php.ini to be used across your entire account.

Reply

I’ll try that to increase the memory limit at my WP. Nice tips.

Reply

Thanks so much for this post. I’ve been seeing the same message I don’t know what to do. It’s a good thing you discussed this error in your blog.

Reply

I was actually having this problem when trying to upgrade a few of my blogs. I had to do a manual install.

Reply

I was actually having this problem when trying to upgrade a few of my blogs. I had to do a manual install.

Reply

The best route is certainly deactivating plugins during the upgrade. You can also use a host that provides their own WordPress upgrades. Generally they don’t have the issue, though often they recommend disabling the plugins anyway.

It’s a good idea regardless.

Reply

I was facing the same problem with my Wordpress 2.8.2 so i searched for it and got the right information from you.Thanks for your help.

Reply

Leave a comment
Drive-By comments will be deleted! Like "Thanks for sharing", "Nice post", or any other text that doesn't contribute to the discussion. If you ask a very specific question about your particular WordPress theme, it will probably be deleted. I can fix your WordPress site but for a price. If you ask a question like "Why don't my blog work right", it will be deleted. If you ask a question about your WordPress site without a leaving a link to it, it will be deleted. The point is to ask questions and or comment on the the actual content of the post, and to please use some common sense. All comments are moderated and will appear when approved. Thank you.

(required)

(required)