{"id":2211,"date":"2010-08-24T21:41:29","date_gmt":"2010-08-24T21:41:29","guid":{"rendered":"http:\/\/www.bargh.co.uk\/blog\/?p=232"},"modified":"2010-08-24T21:41:29","modified_gmt":"2010-08-24T21:41:29","slug":"fatal-error-allowed-memory-size-exhausted-in-wordpress-3-0-upgrade","status":"publish","type":"post","link":"https:\/\/bargh.co.uk\/blog\/fatal-error-allowed-memory-size-exhausted-in-wordpress-3-0-upgrade\/","title":{"rendered":"Fatal error: Allowed memory size exhausted in WordPress 3.0 upgrade"},"content":{"rendered":"<p>Have you upgraded to WordPress 3.0 and got the following message when trying to automatically update to 3.01?<\/p>\n<p><strong><code>Fatal error: Allowed memory size of xxxxxxxx bytes exhausted (tried to allocate xxxxxxxxx bytes)<\/code><\/strong><\/p>\n<p>I used to get that error on older versions of WordPress from time to time and resolved it by editing the wp-settings.php file. There&#8217;s a line that says <em><strong>define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;32M&#8217;); <\/strong> <\/em>and a quick edit to<em><strong> <\/strong><strong>define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;64M&#8217;); <\/strong><\/em>used to sort the problem out<em><strong>.<br \/>\n<\/strong><\/em><\/p>\n<p>But on a recent attempt to upgrade from 3.0 to 3.01 I got the error and found the memory allocation in the wp-settings.php file is split out as an include file on line 20<\/p>\n<p><strong><em>require( ABSPATH . WPINC . &#8216;\/default-constants.php&#8217; );<\/em><\/strong><\/p>\n<p>and the &#8220;default-constants.php&#8221; file, with its memory settings is in the wp-includes folder and appears to now be correctly specified at 64M. After some research I found a site that suggested increasing this to 128M, or 256M I tried both and neither worked.<\/p>\n<p>Another site suggested changing the PHP.ini file&#8217;s memory from 32M to 64M, but I use Namecheap and I don&#8217;t have access to that file.<\/p>\n<p>I finally found the answer that worked for me.<\/p>\n<p>Locate the .htaccess file in the WordPress root folder and add this line:<\/p>\n<p><strong><em>php_value memory_limit 64M<\/em><\/strong><\/p>\n<p>That worked fine. I hope that helps you too.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you upgraded to WordPress 3.0 and got the following message when trying to automatically update to 3.01? Fatal error: Allowed memory size of xxxxxxxx bytes exhausted (tried to allocate xxxxxxxxx bytes) I used to get that error on older versions of WordPress from time to time and resolved it by editing the wp-settings.php file. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1296],"tags":[1607,1856,2246,2304],"class_list":["post-2211","post","type-post","status-publish","format-standard","hentry","category-helping-hand","tag-fatal-error","tag-memory-limit","tag-upgrade","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2211"}],"version-history":[{"count":0,"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2211\/revisions"}],"wp:attachment":[{"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bargh.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}