[wp-trac] [WordPress Trac] #29341: Rause default value for WP_MEMORY_LIMIT in wp-includes/default-constants.php

WordPress Trac noreply at wordpress.org
Sat Aug 23 19:45:22 UTC 2014

#29341: Rause default value for WP_MEMORY_LIMIT in wp-includes/default-
 Reporter:  DavidAnderson   |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
 wp-includes/default-constants.php currently has a default value for
 WP_MEMORY_LIMIT of 40Mb (or 64Mb for multisite).

 The effect of this constant is that if the current value of ini_get(
 'memory_limit' ) is less, then ini_set() is used to raise it to at least

 This default is fine, if your site has few plugins. When the constant was
 brought in (looks like 3.0, from the comment in the code), sites tended to
 have fewer plugins, and need less memory.

 It is not clear exactly what the rationale behind the default choice for
 WP_MEMORY_LIMIT is, and what data it is based upon. Nevertheless, I get to
 read a lot of log files through support for one of my plugins, and it is
 not uncommon for me to see sites where PHP memory use has exceeded 40Mb.
 It is not uncommon for me to have to advise someone on how to raise their
 PHP memory limit, because they are trying to clone their site into
 something like MAMP, which apparently has a lower limit than this (can't
 verify: I have no Mac), and the WP default is too low to then load their
 site successfully.

 Based on my (admittedly anecdotal) experiences, I would recommend 64Mb or
 80Mb as a much more suitable default in 2014 (and a corresponding increase
 for multisite), if the aim is for users to not be surprised by a lack of
 memory. I don't think that hosting companies will have a problem with
 this. I have extensive data on default settings of the PHP memory limit,
 and 99.8% of web hosting companies in that data have 64Mb or more. 99.5%
 have 96Mb or more.

Ticket URL: <https://core.trac.wordpress.org/ticket/29341>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list