{"id":2021353,"date":"2024-07-26T07:01:16","date_gmt":"2024-07-26T07:01:16","guid":{"rendered":"https:\/\/wpx.net\/blog\/?p=2021353"},"modified":"2025-02-21T11:47:42","modified_gmt":"2025-02-21T11:47:42","slug":"wordpress-memory-exhausted-error-a-simple-solution","status":"publish","type":"post","link":"https:\/\/wpx.net\/blog\/wordpress-memory-exhausted-error-a-simple-solution\/","title":{"rendered":"WordPress Memory Exhausted Error\u00a0&#8211; A Simple Solution"},"content":{"rendered":"\n<p>In this article, we will go through and uncover uncertainties in regards to memory limits in WordPress. There are two types of memory limit and it is important that we distinguish them properly. Most articles regarding the topic name them both the same way, however, they are completely different. Of course, we will go through the errors associated with reaching this limitation and offer different solutions on how to fix them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_does_WordPress_Memory_Limit_Error_mean_and_where_can_I_find_it\"><\/span>What does WordPress Memory Limit Error mean and where can I find it?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In terms of breaking everything down in simpler terms, the Memory Limit is connected to the built-in PHP structure of WordPress itself and it is set by default for each website installation.<\/p>\n\n\n\n<p>The default settings for WP Memory Limit are quite low and sometimes may hinder your workflow and operations in the back end while working on your website. Usually, they can be viewed from each WordPress Dashboard.<\/p>\n\n\n\n<p>To do so, you will need to login your website and navigate to <strong>Tools <\/strong>(1) and select <strong>Site Health <\/strong>(2):<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfULK0plWF420RKmM_5ZTH5TuxFfHxUEiaXjvw7-XMNECJgntEGK1-h0dzMFt8FVS3ExA_TbHYN0EU4SiSLtiHLLxqsQCoIJpWCqXVyW3fEqyoKWXVd7hNAltlKA2HxlgB3a2SaRXTPzANilqjv8yKaE60o?key=IFDNoCgqOAujwhzoBaQJoQ\" alt=\"wordpress memory limit error\"\/><\/figure>\n\n\n\n<p>Once you have selected the tab, you will need to choose the section <strong>Info<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeQwKtxl8jgbmxDxWYZptHDlY4u3WkQhm7cIbZPHwgAZ6-x7tbPI3I-8cRCO2v_7QZRTMk7EHWnxWqOQhha7gO8hK1PDI7194AWp0he_uYq-hhBhCicpI1E9CiyslimirWjvFUXniLuC6751Uls4kMOvpco?key=IFDNoCgqOAujwhzoBaQJoQ\" alt=\"site health info\"\/><\/figure>\n\n\n\n<p>From there, it will load up and provide dropdown options for each specific part of your website, including the resources for your PHP Memory Limit. To view the specific limit set for your website, you need to select <strong>Server<\/strong> (1) and see field <strong>PHP Memory Limit <\/strong>(2):<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXctUt540MKgECFJi2zvIPXxgap1RPKBTfNp5f4QQASfAm9P1pjzewCnhHmLW7-lPEVto2ZxaGLJJjfZgWwC4-PMb0t2YAP_1IGho25qGN0ai8mcJxBgUrpHZ3KRpDwzNZL77JHes8ixCD_DmJD6kt5myDV4?key=IFDNoCgqOAujwhzoBaQJoQ\" alt=\"PHP memory limit\n\"\/><\/figure>\n\n\n\n<p>That\u2019s it! The next step would be to set a higher limit to test if that fixes the error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Fix_WordPress_Memory_Exhausted_Error\"><\/span>Fix WordPress Memory Exhausted Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To fix the error, we will need access to the website files. You can use an external FTP client or our own built-in <a href=\"https:\/\/kb.wpx.net\/how-can-i-access-my-file-manager\/\"><strong>File Manager<\/strong><\/a> to handle the process without much effort.<\/p>\n\n\n\n<p>The file responsible for your WP Memory Limit is the <strong>wp-config.php <\/strong>file. To adjust the limit, you would need to navigate through the original path: <strong>public_html<\/strong> and you should be able to find it there:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdHGEIJFOOOL5uerXPUm4z75hMcLDiOEEBw2kPTlIoFBA2_z1_oECjCn4pwhvzPzB5Y0DGJJ04raBNrx2jWKOOrbyRIGZc5OIIZ1Q0i0u_UM3pkS7Dc6t2HEssg6T5qXBsB_wc9jLCwScH_ZmwDBEpnz5Q?key=IFDNoCgqOAujwhzoBaQJoQ\" alt=\"fix wordpress memory exhausted error\"\/><\/figure>\n\n\n\n<p>Once you find the file, you simply need to double-click on it to load up the code inside and edit it freely. The final step of the process will require putting a certain code with a higher limitation for your WP Memory Limit.<\/p>\n\n\n\n<p>The code looks like this:<br><br><em>define( &#8216;WP_MEMORY_LIMIT&#8217;, &#8216;1024M&#8217; );<\/em><\/p>\n\n\n\n<p>You can see that the code indicates that the WP Memory Limit should be set to 1024 MB instead of the previous setting by default to 384 MB.<\/p>\n\n\n\n<p>The code needs to be set right above the last possible text and do not forget to <strong>Save <\/strong>&nbsp;the changes made to the file:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1501\" height=\"816\" src=\"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/image-44.png\" alt=\"wp memory limit\" class=\"wp-image-2021356\" srcset=\"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/image-44.png 1501w, https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/image-44-300x163.png 300w, https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/image-44-1024x557.png 1024w, https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/image-44-768x418.png 768w\" sizes=\"auto, (max-width: 1501px) 100vw, 1501px\" \/><\/figure>\n\n\n\n<p>Once that is done, you can check it by going to <strong>Site Health <\/strong>again from Step 1 and revisiting the information shown by WordPress:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcsS_EZZfwvDVCIMTqyRWVTjcecFdyrrSBDz3p4MN1Ot00y4aP82zfsRF1HR0mh6YSjzGiymzqRp3r4kefAajXh9O49un2Xl1bOa4jEdrZPfyAIqqEpzpE6TWXVfS4qgAVTZ3QGWp1Yu-cJq32d1v9Im8E?key=IFDNoCgqOAujwhzoBaQJoQ\" alt=\"php emory limit\"\/><\/figure>\n\n\n\n<p>That\u2019s it! You have successfully changed the WP Memory Limit for your website.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Whats_the_difference_between_WP_Memory_Limit_and_Server_Memory_Limit\"><\/span>What\u2019s the difference between WP Memory Limit and Server Memory Limit?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As promised in the beginning, it is important to mention the difference between two types of memory limit. The first one, which we discussed in this topic is named either <strong>WP Memory Limit or PHP Memory<\/strong> <strong>Limit<\/strong>, strictly connected to your WordPress installation.&nbsp;<\/p>\n\n\n\n<p>The next one is Server Memory Limit or in other words <strong>RAM<\/strong>. That is the allocated server resource for each WordPress website you get per your hosting plan configuration. That limitation is fixed and can not be changed, unless you upgrade the plan itself to a higher one with more resources or vice versa.&nbsp;<\/p>\n\n\n\n<p>I hope that we cleared all the confusion in regards to the two types of memory and how it can be addressed. If you still receive the same error after making the needed changes, then we recommend contacting our WPX Support for further technical guidance.<\/p>\n\n\n\n<p>If you find this article useful, you should also read our blog posts on <a href=\"https:\/\/wpx.net\/blog\/ultimate-guide-how-to-fix-wordpress-permalink-issues\/\" data-type=\"link\" data-id=\"https:\/\/wpx.net\/blog\/ultimate-guide-how-to-fix-wordpress-permalink-issues\/\">How to Fix WordPress Permalink Issues<\/a> and <a href=\"https:\/\/wpx.net\/blog\/how-to-fix-lcp-issue-in-wordpress\/\" data-type=\"link\" data-id=\"https:\/\/wpx.net\/blog\/how-to-fix-lcp-issue-in-wordpress\/\">How to Fix LCP Issue in WordPress<\/a>!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will go through and uncover uncertainties in regards to memory limits in WordPress. There are two types of memory limit and it is important that we distinguish them properly. Most articles regarding the topic name them both the same way, however, they are completely different. Of course, we will go through [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":2021354,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[86],"tags":[138,145,161,139,121],"ppma_author":[150],"class_list":["post-2021353","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-guide","tag-how-to","tag-memory-exhausted-error","tag-step-by-step","tag-wordpress"],"blocksy_meta":[],"authors":[{"term_id":150,"user_id":29,"is_guest":0,"slug":"svetlozar-todorov","display_name":"Svetlozar Todorov","avatar_url":{"url":"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/Profile-Picture.png","url2x":"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/07\/Profile-Picture.png"},"0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/comments?post=2021353"}],"version-history":[{"count":3,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021353\/revisions"}],"predecessor-version":[{"id":2022049,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021353\/revisions\/2022049"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/media\/2021354"}],"wp:attachment":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/media?parent=2021353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/categories?post=2021353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/tags?post=2021353"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/ppma_author?post=2021353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}