0

I'm using the WP_Overview plugin to view WordPress' memory limit.

It's showing Mem: WP 32M (def) Usage 25% 32.59M of PHP Limit 128M.

However, in my functions.php, I have the following line of code: define('WP_MEMORY_LIMIT','96M');.

I've also installed the Change Memory Limit plugin and tried updating the figure from there, again to 96M.

Despite this, the Overview plugin is still showing 32M.

Three questions in one:

  1. Which gets used, the PHP limit or the WP limit?
  2. Is this plugin a good way of checking the limit, or should I try a different method?
  3. Is this potentially a problem with WP 3.X? I found this post on WP Support which might imply that it is. Their solution suggests moving the PHP.INI but I'm not particularly keen on doing that - surely it can't be safe?

Thanks in advance,

1 Answer 1

2

From quick look (at horribly minified code) plugin just echoes WP_MEMORY_LIMIT in that place so no idea what is going on for you.

The basic way to retrieve real PHP memory limit (at specific point! it can be changed in runtime) is ini_get( 'memory_limit' ). Related WordPress constants are mostly just a guidelines for WP to stay under.

1
  • I'm currently sitting at 30mb usage, with 32mb WP limit. If a big script is running, is there a chance that it'll be hitting the 32mb limit?
    – turbonerd
    Apr 1, 2012 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.