0

What code do I need to use to display the WordPress memory limit and WordPress maximum memory limit.

In PHP for example, I can just get the memory limit by using:

echo $memory_limit = ini_get('memory_limit');

What would be a similar equivalent in WordPress?

4
  • That's probably still right. I don't think WordPress has a separate memory limit, does it? The limits will be from the PHP environment.
    – Rup
    Sep 30, 2019 at 11:50
  • am talking of how to echo values of memory limit and maximum memory limit already set by my wordpress aplications
    – chinazaike
    Sep 30, 2019 at 11:57
  • OK, there is wp_raise_memory_limit. Is that what you meant? Are your applications using this as a matter of course? They probably shouldn't be. At first glance that's just the WP_MAX_MEMORY_LIMIT constant, if wp_is_ini_value_changeable( 'memory_limit' ) is true.
    – Rup
    Sep 30, 2019 at 12:07
  • Thanks Rup. Thats is what am looking for. You can update it as answer
    – chinazaike
    Sep 30, 2019 at 12:15

1 Answer 1

1

Resolved via this functions as suggested by Rup

wp_is_ini_value_changeable( 'memory_limit' )

source link

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.