{"id":29441,"date":"2021-02-17T16:12:21","date_gmt":"2021-02-17T10:27:21","guid":{"rendered":"https:\/\/rarathemes.com\/blog\/?p=29441"},"modified":"2026-03-06T17:19:46","modified_gmt":"2026-03-06T11:34:46","slug":"resolve-wordpress-memory-limit-error","status":"publish","type":"post","link":"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/","title":{"rendered":"How to Resolve the WordPress Memory Limit Error?"},"content":{"rendered":"\n<p>Are you having problems using WordPress?<\/p>\n\n\n\n<p>Well, it is quite common. With unlimited flexibility comes a catch. Make sure to be comfortable with working on technical issues you may come across when using WordPress. Some problems may be easy to solve, while others may be a headache.&nbsp;<\/p>\n\n\n\n<p>One problem is the WordPress memory limit error. You can get confused when you first see it. But after reading this article, you will be able to solve this error in a few minutes despite your WordPress experience.&nbsp;<\/p>\n\n\n\n<p>Here we have explained what a WordPress memory limit error is and how you can resolve it with two methods. Let\u2019s begin.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" 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: #999;color:#999\" 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><\/span><\/a><\/span><\/div>\n<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:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#What_is_WordPress_Memory_Limit_Error\" >What is WordPress Memory Limit Error?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#What_Causes_the_WordPress_Memory_Limit_Error\" >What Causes the WordPress Memory Limit Error?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#How_Can_You_Check_Your_PHP_Memory_Limit\" >How Can You Check Your PHP Memory Limit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#How_to_Resolve_the_WordPress_Memory_Limit_Error\" >How to Resolve the WordPress Memory Limit Error?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#Method_1_Increasing_the_PHP_Memory_for_Your_Website\" >Method 1: Increasing the PHP Memory for Your Website<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#Method_2_Upgrading_your_Hosting_Plan\" >Method 2: Upgrading your Hosting Plan<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#FAQs_Frequently_Asked_Questions\" >FAQs (Frequently Asked Questions)<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#Q_How_to_check_your_WordPress_memory_limit\" >Q. How to check your WordPress memory limit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#Q_How_to_changeincrease_the_memory_limit_in_WordPress\" >Q. How to change\/increase the memory limit in WordPress?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/rarathemes.com\/blog\/resolve-wordpress-memory-limit-error\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_WordPress_Memory_Limit_Error\"><\/span>What is WordPress Memory Limit Error?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>WordPress needs a certain memory on your server to function. By default, the memory allocation for WordPress is 64M. But sometimes, that memory allocation is not enough. Is such a case, you will see the WordPress memory limit error as:&nbsp;<\/p>\n\n\n\n<p><strong>fatal error: the allowed memory size of 67108864 bytes exhausted<\/strong><\/p>\n\n\n\n<p>Instead of the message, you may also see a white screen of death or a maintenance mode. Either way, you are running out of memory and need to fix it. Luckily, you will learn that in the upcoming sections.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Causes_the_WordPress_Memory_Limit_Error\"><\/span>What Causes the WordPress Memory Limit Error?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Every website needs a certain memory to store the data, such as plugins, <a class=\"rank-math-link\" href=\"https:\/\/rarathemes.com\/wordpress-themes\/\">themes<\/a>, databases, and content. Sometimes, the resources demand more memory. However, the web servers mark a limit on the memory that can be used by any script. By default, WordPress has 64M memory allocation.&nbsp;<\/p>\n\n\n\n<p>In such a case where the demand exceeds the limitation, you get the memory limit error. Mostly, this error occurs when you upload media files to your site or install a new theme and plugin.&nbsp;<\/p>\n\n\n\n<p>You may wonder why the servers limit the memory allocation. Well, it is an important feature to protect the servers. Servers need enough memory to run multiple applications for different sites at the same time. Without the limitation, a poorly written script may consume the entire memory of the server. In this case, the server crashes and takes down your site along with all the other sites it hosts.<\/p>\n\n\n\n<p>WordPress is based on the scripts written in PHP, and it needs to abide by the allocated limitations.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_Can_You_Check_Your_PHP_Memory_Limit\"><\/span>How Can You Check Your PHP Memory Limit?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you are using WordPress 5.2 or above, you can easily check your PHP memory limit using the Site Health tool. Here is how you proceed:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your dashboard.<\/li>\n\n\n\n<li>Navigate to \u2018Tools\u2019 on the left side panel.<\/li>\n\n\n\n<li>Click on the \u2018Site Health\u2019<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"370\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/sitehealth.png\" alt=\"site health\" class=\"wp-image-29443\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/sitehealth.png 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/sitehealth-300x152.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/sitehealth-118x60.png 118w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on the \u2018Info\u2019 option at the top.\u00a0<\/li>\n\n\n\n<li>Scroll down to the \u2018Server\u2019 section.\u00a0<\/li>\n\n\n\n<li>Here you can see the \u2018PHP memory limit\u2019 option. It shows the memory limit for your PHP scripts.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"393\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/PHP-memory-limit.png\" alt=\"PHP memory limit\" class=\"wp-image-29444\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/PHP-memory-limit.png 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/PHP-memory-limit-300x162.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/PHP-memory-limit-111x60.png 111w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Resolve_the_WordPress_Memory_Limit_Error\"><\/span>How to Resolve the WordPress Memory Limit Error?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that you know what a WordPress memory limit error is and what causes it let us learn how to resolve it. There are two methods to solve this error. They are:&nbsp;<\/p>\n\n\n\n<p><strong>Method 1: Increasing the PHP Memory for your website<\/strong><\/p>\n\n\n\n<p><strong>Method 2: Upgrading your hosting plan<\/strong><\/p>\n\n\n\n<p>We will be explaining these two methods below:&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_1_Increasing_the_PHP_Memory_for_Your_Website\"><\/span>Method 1: Increasing the PHP Memory for Your Website<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>As the error name suggests, the simple thing you can do to solve it is by increasing the memory allocation for your PHP file. The amount you can increase the memory depends on your hosting plan and hosting provider. We have covered that part in the second method. For now, let\u2019s focus on increasing PHP memory.&nbsp;<\/p>\n\n\n\n<p>The memory you can use is set in your site\u2019s wp-config.php file. The value set in this file may or may not coincide with the value set by your hosting provider. You can try to increase the value in the following ways:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your site using an FTP client or a file manager.\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Here is an example of accessing the site using FileZilla.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"436\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/access-the-wp-config-file.png\" alt=\"access the wp-config file\" class=\"wp-image-30043\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/access-the-wp-config-file.png 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/access-the-wp-config-file-300x179.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/access-the-wp-config-file-100x60.png 100w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>The right quadrants show the list of folders that contain your website\u2019s file.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate down to your website\u2019s root folder. Mostly, the root folder is named after your domain name or public_html. Double click to open it.\u00a0<\/li>\n\n\n\n<li>Right-click the wp-config.php file and click on the \u2018Edit\u2019 option.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"354\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/edit-the-wp-config-1.png\" alt=\"edit the wp-config\" class=\"wp-image-30098\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/edit-the-wp-config-1.png 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/edit-the-wp-config-1-300x145.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/03\/edit-the-wp-config-1-124x60.png 124w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>Do not touch any other file or line of code except the ones we are about to discuss below. Backing up your files is a good idea. You can restore the changes if you delete or make any mistake in the files.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Paste it above the line that reads, \u201cThat\u2019s all, stop editing! Happy blogging.\u201d<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_MEMORY_LIMIT', '256M' );<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"440\" src=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/Pasting-the-code-in-wp-config.png\" alt=\"Pasting the code in wp-config\" class=\"wp-image-29447\" srcset=\"https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/Pasting-the-code-in-wp-config.png 730w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/Pasting-the-code-in-wp-config-300x181.png 300w, https:\/\/rarathemes.com\/blog\/wp-content\/uploads\/2021\/02\/Pasting-the-code-in-wp-config-100x60.png 100w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>256 MB memory allocation is sufficient for most of the websites.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the changes and exit the editor.\u00a0<\/li>\n\n\n\n<li>Visit your website and do what you were trying to do prior to getting the limit error message.\u00a0<\/li>\n<\/ul>\n\n\n\n<p>If you don\u2019t see the error, you have successfully resolved it. In case the error persists, increase the memory further. If it does not solve the issue even after a few tries, chances are, you may have reached your hosting provider\u2019s limit.&nbsp;<\/p>\n\n\n\n<p>In such a case, try the second method, as explained below:&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_2_Upgrading_your_Hosting_Plan\"><\/span>Method 2: Upgrading your Hosting Plan<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you keep seeing the memory limit error even after increasing the memory in the wp-config.php file, there is a good chance you have reached your hosting plan limit.&nbsp;<\/p>\n\n\n\n<p>Every hosting provider allocates a certain amount of resources for the hosting plan you choose. You can check your hosting provider\u2019s dashboard to see the memory limitation. You can directly contact your hosting provider as well.&nbsp;<\/p>\n\n\n\n<p>If you confirm that you have reached your hosting plan\u2019s limit, it is time for you to upgrade to a higher tier. For a shared hosting plan user, switching to cloud hosting or a VPS (Virtual Private Server) may fix the error. Both these plans allocated higher resources than the shared hosting plan.&nbsp;<\/p>\n\n\n\n<p><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">These reviews will help you figure out the\u00a0best hostin<\/span>g provider\u00a0and a suitable hosting plan for your website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"FAQs_Frequently_Asked_Questions\"><\/span>FAQs (Frequently Asked Questions)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1612938702504\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><span class=\"ez-toc-section\" id=\"Q_How_to_check_your_WordPress_memory_limit\"><\/span>Q. How to check your WordPress memory limit?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>You can check your WordPress memory limit as follow:\u00a0<\/p>\n<p>\u2022 Log in to your admin dashboard.<br \/>\u2022 Go to \u2018Tools\u2019 and click on the \u2018Site Health\u2019 option.\u00a0<br \/>\u2022 Scroll down to the server section.\u00a0<br \/>\u2022 Here you can find the PHP memory limit of your server.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1612938750695\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><span class=\"ez-toc-section\" id=\"Q_How_to_changeincrease_the_memory_limit_in_WordPress\"><\/span>Q. How to change\/increase the memory limit in WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>You can change the memory limit in WordPress by editing your wp-config.php file from your root folder. You need to add \u201c<strong>define( &#8216;WP_MEMORY_LIMIT&#8217;, &#8216;256M&#8217; );\u201d <\/strong>or increase the limit value. We have explained how to do that in the above section. Check it out.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We understand how frustrating it can be to receive an error message on WordPress, particularly when you don\u2019t know the cause. Fortunately, the memory limit error tells you exactly what the problem is, and so, finding the solution becomes straightforward.<\/p>\n\n\n\n<p>We have mentioned two ways you can fix the PHP memory limit error. Also, you can check <a href=\"https:\/\/rarathemes.com\/blog\/update-php-version-wordpress-website\/\" class=\"rank-math-link\">How to update PHP Version<\/a> for detailed information.  For any further queries regarding this error, reach out to us in the comment section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you having problems using WordPress? Well, it is quite common. With unlimited flexibility comes a catch. Make sure to be comfortable with working on technical issues you may come &hellip; <\/p>\n","protected":false},"author":15,"featured_media":29466,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_be_single_description":"","_be_image_uploader":0,"_be_meta_button_label":"","_be_meta_button_url":"","_be_meta_button_newtab":false,"_be_meta_rel_attribute":"","footnotes":""},"categories":[16,3],"tags":[],"class_list":["post-29441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced-tutorials","category-tutorials","latest_post"],"_links":{"self":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts\/29441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/comments?post=29441"}],"version-history":[{"count":1,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts\/29441\/revisions"}],"predecessor-version":[{"id":41319,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/posts\/29441\/revisions\/41319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/media\/29466"}],"wp:attachment":[{"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/media?parent=29441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/categories?post=29441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rarathemes.com\/blog\/wp-json\/wp\/v2\/tags?post=29441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}