<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WordPress &amp; PHP memory-related notes]]></title><description><![CDATA[<p dir="auto">I was recently experimenting a bit with php.ini settings and memory constants in the wp-config.php. Here is what I learned which I had found confusing before, so wanting to share this in case anyone didn't know this already:</p>
<p dir="auto">When looking at the Tools &gt; Site Health &gt; Info page in WordPress...</p>
<ul>
<li>The <code>PHP memory limit</code> value (under Server tab) comes from the <code>memory_limit</code> set in the <strong>php.ini</strong> file.</li>
<li>The <code>WP_MAX_MEMORY_LIMIT</code> value (under WordPress Constants tab) also comes from the <code>memory_limit</code> set in the <strong>php.ini</strong> file when the <code>WP_MAX_MEMORY_LIMIT</code> isn't also defined in the <strong>wp-config.php</strong> file.  ​If the <code>WP_MAX_MEMORY_LIMIT</code> is defined in the <strong>wp-config.php</strong> file, then this overrides the <code>memory_limit</code> parameter set in the <strong>php.ini</strong> file.</li>
<li>The <code>WP_MEMORY_LIMIT</code> value (under WordPress Constants tab) comes from the <code>WP_MEMORY_LIMIT</code> defined in the <strong>wp-config.php</strong> file (this is hard-coded). If not defined, it defaults to <code>40M</code>.</li>
</ul>
<p dir="auto">I would recommend increasing <code>WP_MEMORY_LIMIT</code> closer to the overall app memory limit by adding something like this to your <strong>wp-config.php</strong> file: <code>define( 'WP_MEMORY_LIMIT', '2G' );</code> for a 2 GB memory limit to WordPress for example.</p>
<p dir="auto">I had found it confusing earlier as to where each parameter was defined and how it was set (and what the defaults are). Hopefully this helps others for the future too.</p>
]]></description><link>https://forum.cloudron.io/topic/4945/wordpress-php-memory-related-notes</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 12:47:34 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/4945.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Apr 2021 00:07:49 GMT</pubDate><ttl>60</ttl></channel></rss>