Support » Fixing WordPress » Fatal error: Out of memory in class-http.php

  • Okay, I received the following message when attempting an automatic update to WordPress 3.2 (from 3.1.3) through the dashboard:

    Fatal error: Out of memory (allocated 31719424) (tried to allocate 2111437 bytes) in /homepages/31/d313374364/htdocs/thinkjapan/wp-includes/class-http.php on line 1420

    But I’m not understanding exactly what it means or how to solve it. Can anyone with more php experience enlighten me?

    I appreciate the help! – Andrew

Viewing 6 replies - 1 through 6 (of 6 total)
  • This error has to do with PHP running out of memory to work with.

    Try one of the following solutions (only one) to increase the amount of memory that PHP is allowed to access:

    1. Increase the memory limit setting in php.ini e.g. (memory_limit = 64M ;). Many hosts may not allow this.

    2. Increase the memory limit via .htaccess e.g. (php_value memory_limit 64M). Many hosts may not allow this.

    3. Increase the memory limit via wp-config.php e.g. (define(‘WP_MEMORY_LIMIT’, ’64MB’);)

    If 64MB isn’t enough, try 128.

    If you’re not sure how to do this, call your hosting provider’s support and explain the situation and that you need some help to increase the memory limit for WordPress – they will understand what you need.



    Forum Moderator

    Try increasing the memory available to PHP:

    Thanks esmi and Ursula for your advice. However, I am still encountering the issue.

    I have since tried a few things, and instead run into out of memory error codes in media.php on line 254, 1006.

    I have TRIED creating a php.ini override file to adjust memory_limit, and also tried adding code into wp-config.php and .htaccess with no success. Perhaps I’m not putting the file in the right place (tried the website’s root folder), or using incorrect syntax.

    Or should I bully my web host more? They have not been particularly helpful, and seemed to have dodged around the idea of changing the php.ini settings on their end.

    Or do I just need to reinstall WordPress

    Any advice and/or experience in the matter would be highly appreciated.



    Had the same problem. When I deactivated all my plugins, it worked beautifully. Then after update, reactivated plugins. It seems it may be a plugin conflict problem.



    I believe you now control memory limits in /wp_includes/default-constants.php

    Experienced this just now, tried:
    define('WP_MEMORY_LIMIT', '64MB');
    define('WP_MEMORY_LIMIT', '256MB');
    some .htaccess option
    none worked.

    Finally, after deactivating all Plugins (be sure to make a list of what is currently active first!), I was able to update WP, update Plugins, and update Themes.

    Then I re-Activated the Plugins from my list, and voila!

    Just FYI, some times you have to try a few different things…


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Out of memory in class-http.php’ is closed to new replies.