[wp-trac] [WordPress Trac] #32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
WordPress Trac
noreply at wordpress.org
Wed Jul 8 02:12:36 UTC 2015
#32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
-----------------------------+-----------------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Bootstrap/Load | Version: 3.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+-----------------------------
Comment (by nacin):
Replying to [comment:1 jeremyfelt]:
> So if `memory_limit` < 256MB, set `WP_MAX_MEMORY_LIMIT` to 256MB,
otherwise set `WP_MAX_MEMORY_LIMIT` to `memory_limit`?
Sure, that seems fine. I think I first thought we should just set
WP_MAX_MEMORY_LIMIT to 256MB but then ignore its value, but that would
cause problems with anyone manually using it. (And we use it a bunch of
times, wrapping it with either the admin_memory_limit or
image_memory_limit filters.
If someone is ambitious: I'd suggest a utility called
wp_raise_memory_limit() that can only raise it. That would allow us to DRY
up some things.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32075#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list