{"id":4393,"date":"2017-03-23T09:49:26","date_gmt":"2017-03-23T09:49:26","guid":{"rendered":"http:\/\/amazing-money.flywheelsites.com\/?p=4393\/"},"modified":"2017-03-23T09:49:26","modified_gmt":"2017-03-23T09:49:26","slug":"wordpress-allowed-memory-limit-error","status":"publish","type":"post","link":"https:\/\/beheydt.be\/en\/wordpress-allowed-memory-limit-error\/","title":{"rendered":"WordPress: Allowed memory limit error"},"content":{"rendered":"<div>The dreaded memory limit error, you may have seen it while you were reading your favorite blog, or you may have encountered it while working on your own WordPress website or blog. The error message may seem daunting but is in most cases easy to fix.<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3171 alignleft\" src=\"https:\/\/beheydt.be\/wp-content\/uploads\/2016\/08\/wordpress-logo-300x300.jpg\" alt=\"wordpress-logo\" width=\"300\" height=\"300\" srcset=\"https:\/\/beheydt.be\/wp-content\/uploads\/2016\/08\/wordpress-logo-300x300.jpg 300w, https:\/\/beheydt.be\/wp-content\/uploads\/2016\/08\/wordpress-logo-150x150.jpg 150w, https:\/\/beheydt.be\/wp-content\/uploads\/2016\/08\/wordpress-logo.jpg 584w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div>But first, let&#8217;s see what is causing this error. When do you get this error. Well, that&#8217;s easy, when the PHP code of your WordPress installation requires more money than is allowed by the server, or the default allocated memory, you get this.<\/div>\n<div><\/div>\n<div style=\"text-align: center;\"><em>Fatal error: Allowed memory size of <a dir=\"ltr\" href=\"tel:33554432\" target=\"_blank\">33554432<\/a> bytes exhausted (tried to allocate <a dir=\"ltr\" href=\"tel:2348617\" target=\"_blank\">2348617<\/a> bytes) in \/home4\/xxx\/public_html\/wp-includes\/plugin.php on line xxx<\/em><\/div>\n<div><\/div>\n<div>When installing WordPress, it will try to increase the PHP memory limit, and raise it a whopping 64MB!<\/div>\n<div>But quite often, 64MB still isn&#8217;t going to cut it&#8230; How much will? Well, hard to say, it all depends on the size of your site, the number of plugins, the type of plugins, the number of concurrent visitors,&#8230;<\/div>\n<div><\/div>\n<div>So what to do next? Raise it yourself!<\/div>\n<div>How? Well, there are a few ways to do this, let me list them up for you!<\/div>\n<div><\/div>\n<div>1. First of all, if you have access to the PHP.ini file, open it up in your editor (vi php.ini), search for the memory_limit setting, and set it to a higher number:<\/div>\n<div style=\"text-align: center;\"><em>memory_limit = 256M;<\/em><\/div>\n<div><\/div>\n<div>2. Sometimes, you just aren&#8217;t lucky enough to have access to PHP.ini. But on those bad bad days, you can use .htaccess file in the root directory of your site:<\/div>\n<div style=\"text-align: center;\"><em>php_value memory_limit 128M<\/em><\/div>\n<div><a class=\"thirstylink\" title=\"Wordpress: An Ultimate Guide To The Internets Best Publishing Platform\" href=\"https:\/\/beheydt.be\/link\/blogging\/wordpress-an-ultimate-guide-to-the-internets-best-publishing-platform-a-complete-beginners-guide-to-building-and-designing-your-own-website\/\" target=\"_blank\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"thirstylinkimg alignleft\" title=\"Wordpress: An Ultimate Guide To The Internets Best Publishing Platform\" src=\"https:\/\/beheydt.be\/wp-content\/uploads\/2017\/03\/416xiYk3XEL.jpg\" alt=\"Wordpress: An Ultimate Guide To The Internets Best Publishing Platform\" width=\"208\" height=\"312\" \/><\/a><\/div>\n<div>3. Sometimes you can tell PHP to allow all the memory you want, but WordPress can have its own limits. \u00a0 By adding this line to your wp-config.php file you should be able to fix that:<\/div>\n<div style=\"text-align: center;\"><em>define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8216;128M&#8217;);<\/em><\/div>\n<div><\/div>\n<div>4. If all else fails, talk to your web host and check what they propose.<\/div>\n<div>Some web hosts will not allow a too high memory limit. If that&#8217;s the case, you might want to do a comparison of possible different web hosts, and switch to one that better suits your needs.<\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The dreaded memory limit error, you may have seen it while you were reading your favorite blog, or you may have encountered it while working on your own WordPress website or blog. The error message may seem daunting but is in most cases easy to fix. But first, let&#8217;s see what is causing this error. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3171,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[929],"tags":[1110,624,899],"class_list":["post-4393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging-icantinternet-en","tag-memory-limit","tag-php","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/beheydt.be\/wp-content\/uploads\/2016\/08\/wordpress-logo.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbkKxJ-18R","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/4393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/comments?post=4393"}],"version-history":[{"count":0,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/4393\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/media\/3171"}],"wp:attachment":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/media?parent=4393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/categories?post=4393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/tags?post=4393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}