Support » Fixing WordPress » Memory Usage Exceeded Help

  • Resolved danoneil


    I’ve installed the TPC memory usage plugin and it’s reporting that my php has a limit of 128M but wordpress has a limit of 32M. I’ve added the line to bottom of the wp-config.php file:

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

    When I update some plugins, or try to upgrade wordpress itself, it freezes at the downloading bit and gives me and error in the server logs that the memory has been exceeded.

    Any ideas? I’ve been searching for the solution for weeks on here and using search engines. Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Ok, update…

    I’ve changed the default-constants.php file in wp-includes to set the memory limit to 128M. This is now showing up correctly in the TPC memory usage plugin, however there is still no progress on the wordpress update – it still freezes at downloading and the server log tells me that it’s exceeded the 32M allocated to it…

    Moderator Mark Ratledge


    Forum Moderator

    Some hosts don’t allow memory allocation changes via wp-config or other WP files. They have a global php.ini file that you can’t override. Who is your host? Might be time to find another.

    Thanks for your quick response!

    That’s good info, but what confuses me is that the phpinfo shows up as 128M limits??

    My host uses Heart Internet – their standard limits are 128M… it’s just for some reason WordPress is stuck at 32M.

    Moderator Mark Ratledge


    Forum Moderator

    Change the memory limit in your account php.ini, if you have one. Don’t change default-constants.php. Don’t trust a plugin, but phpinfo should be accurate. But your host may be reporting false memory amounts. They look like a cheap reseller.

    This is really weird. Is there any sure fire way to check on the allowed memory limit? I’ve changed the limit in php5.ini and it’s all reporting fine in phpinfo. If it’s reporting false information, how do we find out??

    Thanks again.

    Moderator Mark Ratledge


    Forum Moderator

    Ask your host; they probably have global limits on php for all of their shared servers. Shared hosting accounts are very limited.

    Thanks, will do!

    Ok, so update from them…

    Had to add the following to end of htaccess as well as the php5.ini additions…

    RLimitMem 128000000

    Now all working!

    Anyone else with heart internet who is experiencing this memory usage limit exceeded – you have to add a line to php5.ini (or php.ini) as well as the one above in htaccess.

    Thanks for all your help with this songdogtech.

    Thanks for info so far I don’t know if you guys are still listening

    I’m a bit of a WP beginner so forgive me if I say something silly.

    I read lots of threads and I tried everything I saw to fix this problem. Changes to wp-config, wp-settings didn’t seem to help. Any changes I made to the htaccess file I get a “Internal Server Error” so I changed it right back again.

    what worked for me
    1) created a new php.ini in wp-admin include a line
    memory_limit = 256M
    (I couldn’t find a php.min on my server)
    2) changed the default-constants.php file in wp-includes to set the memory limit to 128M

    songdogtech- you said “Don’t change default-constants.php”. As this is the only thing that worked I wonder if you could explain why I shouldn’t do this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Memory Usage Exceeded Help’ is closed to new replies.