{"id":13594,"date":"2010-06-19T23:26:58","date_gmt":"2010-06-19T17:56:58","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=13594"},"modified":"2026-10-12T15:56:54","modified_gmt":"2026-10-12T10:26:54","slug":"fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/","title":{"rendered":"Fix &#8220;Allowed Memory Size Exhausted&#8221; Error in WordPress (2026)"},"content":{"rendered":"<p>When WordPress 3.0 launched in June 2010, many bloggers on shared hosting saw upgrades fail with &#8220;Fatal error: Allowed memory size of 33554432 bytes exhausted&#8221;. The <strong>allowed memory size exhausted<\/strong> error still appears today, usually caused by a heavy plugin, a big import or a low hosting limit. Here&#8217;s how to fix it in 2026.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-64698\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted-1024x538.webp\" alt=\"Allowed memory size exhausted error\" width=\"1024\" height=\"538\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted-1024x538.webp 1024w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted-300x158.webp 300w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted-150x79.webp 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted-768x403.webp 768w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/allowed-memory-size-exhausted.webp 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><strong>Quick answer:<\/strong> Add <code>define('WP_MEMORY_LIMIT', '256M');<\/code> to wp-config.php above the line that says &#8220;That&#8217;s all, stop editing!&#8221;. If that doesn&#8217;t work, raise PHP&#8217;s memory_limit in your hosting control panel (or php.ini) to 256M or 512M. If the error continues, a plugin or theme is likely leaking memory; disable plugins to find it.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6ae5c0e13238c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #1a202c;color:#1a202c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae5c0e13238c\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#What_the_error_means\" >What the error means<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#Check_your_current_memory_limit\" >Check your current memory limit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#How_to_fix_allowed_memory_size_exhausted\" >How to fix allowed memory size exhausted<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#1_Increase_WP_MEMORY_LIMIT_in_wp-configphp\" >1. Increase WP_MEMORY_LIMIT in wp-config.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#2_Raise_PHP_memory_limit\" >2. Raise PHP memory_limit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#3_Find_the_memory_hog\" >3. Find the memory hog<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#4_Ask_your_host\" >4. Ask your host<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#FAQ\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#How_much_memory_does_WordPress_need\" >How much memory does WordPress need?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#Is_it_safe_to_increase_the_PHP_memory_limit\" >Is it safe to increase the PHP memory limit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2010\/06\/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade\/#Why_does_the_error_say_128M_when_I_set_256M\" >Why does the error say 128M when I set 256M?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_the_error_means\"><\/span>What the error means<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The message &#8220;Allowed memory size of X bytes exhausted (tried to allocate Y bytes)&#8221; means a PHP script needed more memory than the server allows. 33554432 bytes is 32MB, 134217728 is 128MB and 268435456 is 256MB.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Check_your_current_memory_limit\"><\/span>Check your current memory limit<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Go to Tools &gt; Site Health &gt; Info and open the <strong>Server<\/strong> and <strong>WordPress Constants<\/strong> sections to see the PHP memory limit and WP_MEMORY_LIMIT.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_fix_allowed_memory_size_exhausted\"><\/span>How to fix allowed memory size exhausted<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1_Increase_WP_MEMORY_LIMIT_in_wp-configphp\"><\/span>1. Increase WP_MEMORY_LIMIT in wp-config.php<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Connect with your host&#8217;s File Manager or an FTP client (I prefer FileZilla).<\/li>\n<li>Download a backup of wp-config.php from your WordPress root.<\/li>\n<li>Add <code>define('WP_MEMORY_LIMIT', '256M');<\/code> above &#8220;That&#8217;s all, stop editing!&#8221;.<\/li>\n<li>For the admin area, you can also add <code>define('WP_MAX_MEMORY_LIMIT', '512M');<\/code>.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"2_Raise_PHP_memory_limit\"><\/span>2. Raise PHP memory_limit<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Hosting panel:<\/strong> most hosts (cPanel MultiPHP INI Editor, Hostinger hPanel PHP Configuration, Plesk) let you change memory_limit.<\/li>\n<li><strong>php.ini or .user.ini:<\/strong> set <code>memory_limit = 256M<\/code>.<\/li>\n<li><strong>.htaccess (Apache with mod_php only):<\/strong> <code>php_value memory_limit 256M<\/code>. This causes a 500 error on servers using PHP-FPM, so remove it if the site breaks.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"3_Find_the_memory_hog\"><\/span>3. Find the memory hog<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Deactivate all plugins, then re-enable them one by one.<\/li>\n<li>Switch to a default theme temporarily.<\/li>\n<li>Use the Query Monitor plugin to see memory use per page.<\/li>\n<li>Large imports, page builders and backup plugins are common culprits.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"4_Ask_your_host\"><\/span>4. Ask your host<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>WordPress can&#8217;t exceed the server&#8217;s PHP limit. If changes don&#8217;t stick, ask support to raise it or upgrade your plan.<\/p>\n<p>Related fixes: <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2006\/12\/site-down-36-hours-how-i-fixed-internal-server-errors\/\">how I fixed internal server errors<\/a> and <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/sitemap-generator-wordpress-plugin-internal-server-errors\/\">sitemap plugin memory limits<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"How_much_memory_does_WordPress_need\"><\/span>How much memory does WordPress need?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>256MB is a comfortable limit for most sites. WordPress defaults to 40MB for the front end (64MB on multisite) if nothing higher is set.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_it_safe_to_increase_the_PHP_memory_limit\"><\/span>Is it safe to increase the PHP memory limit?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Yes, within your hosting plan&#8217;s limits. Fix leaking plugins rather than raising it endlessly.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_does_the_error_say_128M_when_I_set_256M\"><\/span>Why does the error say 128M when I set 256M?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Your host&#8217;s PHP limit is probably lower than WP_MEMORY_LIMIT. Raise memory_limit in the hosting panel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When WordPress 3.0 launched in June 2010, many bloggers on shared hosting saw upgrades fail with &#8220;Fatal error: Allowed memory&#8230;<\/p>\n","protected":false},"author":4,"featured_media":64698,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6],"tags":[17],"class_list":["post-13594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/13594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=13594"}],"version-history":[{"count":1,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/13594\/revisions"}],"predecessor-version":[{"id":64699,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/13594\/revisions\/64699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/64698"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=13594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=13594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=13594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}