{"id":653,"date":"2024-11-09T11:34:41","date_gmt":"2024-11-09T11:34:41","guid":{"rendered":"https:\/\/unlimitedhostingplan.in\/articles\/?p=653"},"modified":"2024-11-09T12:00:58","modified_gmt":"2024-11-09T12:00:58","slug":"how-to-fix-fatal-error-memory-exhausted-error-using-cpanel","status":"publish","type":"post","link":"https:\/\/unlimitedhostingplan.in\/articles\/how-to-fix-fatal-error-memory-exhausted-error-using-cpanel\/","title":{"rendered":"How to Fix &#8220;Fatal Error: Memory Exhausted Error&#8221; Using cPanel"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Now and then, you may encounter a few common <a href=\"https:\/\/wordpress.com\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/wordpress.com\/\" rel=\"noreferrer noopener nofollow\">WordPress<\/a> errors. Memory Exhausted Error is one of them. Are you facing such error?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If so, you can quickly fix this by increasing the default PHP memory limit of the web hosting server. You should know that to maintain a decent environment; every server has its default memory limit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But a few plugins or the theme may require more memory to work correctly. When your website keeps growing, it may want to use more resources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, you\u2019re going to learn the way to fix this error using cPanel. Before that, you should know about this error in detail.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#paragraph1\">What is the Memory Exhausted Error<\/a><ul><li><a href=\"#follow-these-steps-to-increase-the-default-memory-limit\">Follow these Steps to Increase the Default Memory Limit<\/a><\/li><li><a href=\"#step-1\">Step 1<\/a><\/li><li><a href=\"#step-2\">Step 2<\/a><\/li><li><a href=\"#step-3\">Step 3<\/a><\/li><li><a href=\"#step-4\">Step 4<\/a><\/li><li><a href=\"#step-5\">Step 5<\/a><\/li><li><a href=\"#i-hope-now-you-can-easily-solve-this-error\">I Hope Now You Can Easily Solve this Error<\/a><\/li><\/ul><\/li><li><a href=\"#paragraph2\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"paragraph1\">What is the Memory Exhausted Error<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As you already know, to run a WordPress website, you require a <a href=\"https:\/\/www.unlimitedhostingplan.in\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.unlimitedhostingplan.in\/\" rel=\"noreferrer noopener nofollow\">web hosting<\/a> server. And WordPress is written in PHP language.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s a server-side language, so it means when WordPress code needs more memory than the default memory allocated by the web hosting server, it tries to increase the memory automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But it goes only up to 64MB which isn\u2019t enough in many cases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To increase the memory, you have to add a code to the <strong>wp-config.php<\/strong> file which is present in your WordPress directory. To access that, you have to use <strong>cPanel<\/strong> provided by your web hosting company.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"follow-these-steps-to-increase-the-default-memory-limit\">Follow these Steps to Increase the Default Memory Limit<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I hope you\u2019re familiar with the interface of cPanel. If you aren\u2019t, let me tell you that every company has its own design but the options available in the cPanel will be almost similar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So you have to focus on the content, not the design.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1\">Step 1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Login to the cPanel account and open the <strong>File Manager<\/strong> from the <strong>Files\u2019<\/strong> section. It\u2019s one of the most common icons you may use every now and then.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"125\" src=\"https:\/\/unlimitedhostingplan.in\/articles\/wp-content\/uploads\/2024\/11\/Screenshot1-4-696x125-1.png\" alt=\"\" class=\"wp-image-654\" style=\"width:774px;height:auto\" srcset=\"https:\/\/unlimitedhostingplan.in\/articles\/wp-content\/uploads\/2024\/11\/Screenshot1-4-696x125-1.png 696w, https:\/\/unlimitedhostingplan.in\/articles\/wp-content\/uploads\/2024\/11\/Screenshot1-4-696x125-1-300x54.png 300w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image1-39.png\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re not a techie person, don\u2019t worry, it\u2019s easy to find.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2\">Step 2<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that you see the <strong>root directory\/public_html<\/strong> instead of the main directory. You can check it from the left-hand-side navigation menu.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image3-30-777x405.png\" alt=\"\" class=\"wp-image-73644\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image3-30.png\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just click on <strong>public_html<\/strong> and you will see the files and folders of your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you do that, you have to search for the <strong>wp-config.php<\/strong> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3\">Step 3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Don\u2019t get confused between the wp-config.php and wp-config-sample.php files. Now to edit the <strong>wp-config.php<\/strong> file, you can either right-click or use the <strong>Edit<\/strong> option shown in the main navigation menu.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image4-30.png\" alt=\"\" class=\"wp-image-73645\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image4-30.png\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The choice is yours. But most of the people prefer to use the right-click because it\u2019s convenient.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4\">Step 4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once you click on the edit link, a popup will appear in front of you. It will show the location of the file and you just need to confirm that you want to edit the file by clicking on the <strong>Edit<\/strong> button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image5-27.png\" alt=\"\" class=\"wp-image-73646\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image5-27.png\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5\">Step 5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The code editor will get opened in a new tab and you can easily see all the codes added by the caching plugin or any other plugins to this file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you have to add one line of the code at the end of this file before a comment <strong>\u201cThat\u2019s all, stop editing! Happy blogging.\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">define( &#8216;WP_MEMORY_LIMIT&#8217;, &#8216;256M&#8217; );<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it. Click on the <strong>Save<\/strong> button from the top-right corner of the page and you\u2019re all set. Try clearing the cache of your browser and check your website.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image2-34.png\" alt=\"\" class=\"wp-image-73647\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/cdn.hostadvice.com\/2018\/07\/image2-34.png\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The memory exhausted error may not be there. If so, congrats, you have successfully fixed the issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This code tells the web hosting server to increase the memory limit to <strong>256MB.<\/strong> Sometimes, it doesn\u2019t work. In such cases, the web hosting doesn\u2019t allow the change in the memory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If so, the only way is to contact your <a href=\"https:\/\/www.unlimitedhostingplan.in\/contact-us\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.unlimitedhostingplan.in\/contact-us\/\" rel=\"noreferrer noopener nofollow\">web hosting customer support<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you know, most of the people use the <a href=\"https:\/\/www.unlimitedhostingplan.in\/web-hosting\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.unlimitedhostingplan.in\/web-hosting\/\" rel=\"noreferrer noopener nofollow\">shared web hostings<\/a> which have the less number of resources as compared to the cloud hosting or the dedicated servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So to fix this error, you may have to ask the customer service representative to increase the memory limit manually.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-hope-now-you-can-easily-solve-this-error\">I Hope Now You Can Easily Solve this Error<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Most of the people fret a lot when they see such error. It\u2019s because if the WordPress codes require to use more memory, you may not be able to install or update any plugin or a theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You may not be even able to upload any media file. So it can be frustrating. Although you will be able to access the admin area still, it\u2019s of no use<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, it\u2019s better you learn to edit the WordPress files. As you have seen above, cPanel is easy to use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many people may consider using FTP, and you can also do that. But cPanel is much more comfortable. I hope you can add the code to increase the memory limit and fix the memory exhausted error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you still have any doubt, feel free to drop a comment and contact us through the contact form.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"paragraph2\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The primary goal is to increase the default memory limit of WordPress. For which, you need to learn where to find the wp-config.php file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Don\u2019t be afraid to use cPanel; it\u2019s quite easy to navigate. Follow the steps mentioned above, and you will solve the issue within a few minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now and then, you may encounter a few common WordPress errors. Memory Exhausted Error is one of them. Are you facing such error? If so, you can quickly fix this by increasing the default PHP memory limit of the web hosting server. You should know that to maintain a decent environment; every server has its [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-security"],"_links":{"self":[{"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/comments?post=653"}],"version-history":[{"count":6,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":663,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/posts\/653\/revisions\/663"}],"wp:attachment":[{"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/media?parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/categories?post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unlimitedhostingplan.in\/articles\/wp-json\/wp\/v2\/tags?post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}