Support » How-To and Troubleshooting » [Resolved] PHP Fatal error: Out of memory

[Resolved] PHP Fatal error: Out of memory

  • Hi guys, I have a big issue with my wordpress. Since 10 days I have a problem of white screen of death. Basically somethime happens that I can’t see my dashboard and my site. Then I refresh the page and everything is fine.
    I checked my error_log.txt file and this what it says:

    [09-Nov-2012 21:40:10 UTC] PHP Fatal error: Out of memory (allocated 19136512) (tried to allocate 77824 bytes) in etc…

    It happens every day several times per day. So I contacted my hosting support and they sad I have to optimize my database. I did it, but the problem still there.

    The support sad that is not a PHP memory problem because scripts are locked over 64MB. They say the problem is because the plugin All in one seo pack is heavy or not well optimized, which sound a bit weird to me, anyway I don’t know how to solve this probelm. I need that plugin I can’t remove it.

    Any easy suggestions?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Josh


    Moderator and Editor Customizer

    Have you tried increasing the memory limit in your wp-config file? Just to make sure?


    I checked my wp-config file:

    define(‘WP_MEMORY_LIMIT’, ’96M’);

    It’s much more than the normal. I read several articles on internet and the majority of them sad to change it to 64MB.

    I also delited all the plugins I didn’t use. I am not a expert of this stuff so I don’t know what it could be.



    Moderator and Editor Customizer

    Okay. Well, some plugins do not do a very good job of “cleaning” up behind themselves.

    It’s possible you had a plugin installed at one time which has left an entry in the database which could be causing this interference. This is why your hosting rep suggested optimizing the database.

    Just curious… have you tried removing the “All in One SEO” plugin… just to see if the error persists?

    I clean the database using wp-optimize once a week but the error persist. I will disable all in one seo pack to se if the error_log file keep reports the error. Do I have to remove it or just disable it?
    If I have to remove it I will delete all the settings…which is not a very good thing…

    Moderator Mark Ratledge


    Forum Moderator

    Cleaning the database will help some, but plugins use memory. Deactivating All in One SEO shouldn’t delete your settings.

    Some web hosts give very little memory. If you can’t raise your memory allocation yourself through wp-config.php, ask your web host to increase your memory allocation. Some won’t, and you may have to find a new web host.

    Who is your host?

    We had big issues with Go-daddy, swapped to Gator Host and the problems were gone.

    Moderator Mark Ratledge


    Forum Moderator

    @cellascarpi: please post your own topic.

    Optimizing your DB won’t help a PHP memory issue much at all.

    What plugins are you running?

    @fashionbooks How is your hosting company?

    Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

    Here’s the thing. If you are getting this message:

    [09-Nov-2012 21:40:10 UTC] PHP Fatal error: Out of memory (allocated 19136512) (tried to allocate 77824 bytes) in etc...

    Then it’s not set to 64M or 96M or anything else.

    19136512 bytes equals exactly 18.25 megabytes. Bit of an odd number that, but that is what the memory limit is set to. There’s just no other way to get that error message.

    Naturally, this is an exceedingly low memory limit.

    Now, the thing about using the define WP_MEMORY_LIMIT trick is that it doesn’t always work. Basically, using that will make WordPress do an ini_set() command, to try to raise the memory limit itself. However, some hosts are configured such that the memory limit is not adjustable via ini_set.

    There’s other ways to change memory limits, but the “right way” depends on the hosting service.
    – Some of them want you to make a custom php.ini file
    – Some of them want you to use .htaccess commands
    – And some of them just won’t let you do it at all.

    Bottom line is that you need to ask your host what the correct way to set the memory limit is.

    There is a way to find out what the memory limit actually is though. In your WordPress root directory, make a file called phpinfo.php. In that file, put this single line of code:

    <?php phpinfo(); ?>

    Now, visit your site in a browser with the phpinfo.php URL. This gives you a big list of all the configuration and settings for your site’s PHP. The actual memory_limit will be in there, along with a ton of other potentially useful information.

    Note, after you’re done testing, remove the phpinfo.php file. It’s a potential security risk, you shouldn’t be displaying all that info to the world.

    I am italian and for starting (becuse this is just an hobby) I have choosen Webperte. I asked them to encrease my Memory limit but they don’t want. They suggested me to buying more space (of course!) but it’s much more expensive.

    I should move to another hosting….

    At the moment I am using 16 plugins an I can’t delete them because I really need them. Some are pro versions, I can’t stay with out them. To be honest I don’t want even renounce to All in One Seo Pack!

    @samuel Wood (Otto) tank for your suggestions but I have to ask an expert webmaster to do what you suggested.

    Definitely move to another hosting company. Try some place like Bluehost… they are inexpensive but really good for the money.

    Yes I was just thinking to Bluehost. I check their site and it’s perfect for what I have to do, I am serously thinking to move. The only thing is to find a webmaster to move my blog from webperte to Bluehost , wich is not a very easy thing here In Italy to find an expert person about WordPress.

    You should be able to find more than you could ever want on jobs.wordpress.net. Just be sure to include your budget and exactly what you’re looking for.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] PHP Fatal error: Out of memory’ is closed to new replies.