{"id":393,"date":"2024-07-21T11:19:38","date_gmt":"2024-07-21T11:19:38","guid":{"rendered":"https:\/\/domainregistrationindia.co.in\/blog\/?p=393"},"modified":"2024-07-21T11:24:50","modified_gmt":"2024-07-21T11:24:50","slug":"increase-php-memory-limit-via-ftp-cpanel","status":"publish","type":"post","link":"https:\/\/domainregistrationindia.co.in\/blog\/increase-php-memory-limit-via-ftp-cpanel\/","title":{"rendered":"Increase PHP Memory Limit Via FTP &amp; cPanel"},"content":{"rendered":"\n<p>Let\u2019s say you are trying to install a WordPress plugin or add PHP files to your website. But your website fails to load and shows a fatal error message that tells you, \u201cYou don\u2019t have enough memory.\u201d<\/p>\n\n\n\n<p>However, you don\u2019t have any idea why it happens and how to solve this problem in the right way. Don\u2019t worry you are not the only one who faces this issue.<\/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=\"#what-is-the-php-memory-limit\">What Is the PHP Memory Limit?<\/a><\/li><li><a href=\"#what-happens-due-to-insufficient-php-memory-limit\">What Happens Due to Insufficient PHP Memory Limit<\/a><\/li><li><a href=\"#1-increase-php-memory-limit-via-ftp\">1. Increase PHP Memory Limit Via FTP<\/a><\/li><li><a href=\"#2-increase-php-memory-limit-via-c-panel\">2. Increase PHP Memory Limit Via cPanel<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>So, in the following guide, we are going to let you know how you can change the PHP memory limit in your WordPress website, which will solve the issue. Before that, let\u2019s understand what the PHP memory limit is and the reasons for the <strong>WordPress Memory Exhausted<\/strong> Error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-php-memory-limit\">What Is the PHP Memory Limit?<\/h2>\n\n\n\n<p>PHP is a server-side scripting language especially used for web development. It helps you process and execute the PHP codes to operate themes, plugins, and core files on WordPress websites.<\/p>\n\n\n\n<p>The PHP memory limit refers to the maximum amount of memory within which a WordPress site has to execute its operations. By default, WordPress sets the PHP memory limit of 32MB, but some web hosting providers increase this to 64MB for all users.<\/p>\n\n\n\n<p>The default memory limit (32MB) is good enough for websites working with small plugins and limited media files. If your website has lots of programs, your <a href=\"https:\/\/www.domainregistrationindia.co.in\/shared-web-hosting.html\">web server<\/a> will require more memory to function the site.<\/p>\n\n\n\n<p>If you want to build an eCommerce website or want to use a page builder like <strong>Elementor<\/strong> to design, your website will surely require increasing the memory limit. Because those large-sized plugins will need more memory to work flawlessly well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-happens-due-to-insufficient-php-memory-limit\">What Happens Due to Insufficient PHP Memory Limit<\/h2>\n\n\n\n<p>One common problem arising from insufficient PHP memory limit is the <strong>\u201cAllowed memory size exhausted\u201d<\/strong> error, like the image below. This error usually occurs when the PHP script tries to allocate more memory than what is available within the defined limit.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wpbeginner.com\/wp-content\/uploads\/2016\/12\/memoryexhuastederror.png\" alt=\"Insufficient PHP Memory limits causes the Allowed memory size exhausted error\" title=\"How to Increase PHP Memory Limit in WordPress (3 Methods) 1\"\/><\/figure>\n\n\n\n<p>Another problem that can arise is the <strong>\u201cOut of memory\u201d<\/strong> error. This can occur while the script tries to execute memory-intensive operations or deal with large amounts of data.<\/p>\n\n\n\n<p>All these can result in degrading the overall website performance. As a result, you\u2019ll face slower execution times and increased response times in running web applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-increase-php-memory-limit-via-ftp\">1. Increase PHP Memory Limit Via FTP<\/h2>\n\n\n\n<p>To improve the PHP memory limit of your website, you need to edit your <strong><em>wp-config.php<\/em><\/strong> file. You can easily access your <strong><em>wp-config.php<\/em><\/strong> using an FTP server like <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">FileZilla<\/a>. It\u2019s free, so you can download and use it to access your website\u2019s backend files.<\/p>\n\n\n\n<p>Learn what is an FTP server and how it works. After finishing the FileZilla setup, you can connect your website to it. Then, you just need to find and open the <strong><em>wp-config.php<\/em><\/strong> file.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/happyaddons.com\/wp-content\/uploads\/2021\/12\/FileZilla-wp-config.png\" alt=\"Use FileZilla to get wp-config file\" class=\"wp-image-37407\" title=\"How to Increase PHP Memory Limit in WordPress (3 Methods) 3\"\/><\/figure>\n\n\n\n<p>Now it\u2019s time to add the below code snippet to the <strong><em>wp-config.php<\/em><\/strong> file (paste it at the end of the code).<\/p>\n\n\n\n<p><strong>define( \u2018WP_MEMORY_LIMIT\u2019, \u2018256M\u2019 );<\/strong><\/p>\n\n\n\n<p>Don\u2019t forget to save the file after editing.<\/p>\n\n\n\n<p>Now you have defined your website\u2019s PHP Memory Limit of 256MB. That is perfect for all websites.<\/p>\n\n\n\n<p><strong>Note:<\/strong> You can increase the memory limit to 512MB based on your need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-increase-php-memory-limit-via-c-panel\">2. Increase PHP Memory Limit Via cPanel<\/h2>\n\n\n\n<p>Log in to your cPanel account using the right credentials. Find and click on the <strong>File Manager<\/strong> option.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/happyaddons.com\/wp-content\/uploads\/2024\/01\/Go-to-File-Manager-in-cPanel.webp\" alt=\"Go to File Manager in cPanel to increase PHP memory limit\" class=\"wp-image-52080\" title=\"How to Increase PHP Memory Limit in WordPress (3 Methods) 4\"\/><\/figure>\n\n\n\n<p>Then navigate to the <strong><em>public_html &gt; your website &gt; wp-config.php<\/em><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/domainregistrationindia.co.in\/blog\/wp-content\/uploads\/2024\/07\/image-1024x538.png\" alt=\"\" class=\"wp-image-394\" srcset=\"https:\/\/domainregistrationindia.co.in\/blog\/wp-content\/uploads\/2024\/07\/image-1024x538.png 1024w, https:\/\/domainregistrationindia.co.in\/blog\/wp-content\/uploads\/2024\/07\/image-300x158.png 300w, https:\/\/domainregistrationindia.co.in\/blog\/wp-content\/uploads\/2024\/07\/image-768x404.png 768w, https:\/\/domainregistrationindia.co.in\/blog\/wp-content\/uploads\/2024\/07\/image.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Copy and paste the following code to the respective section on the page.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>define( 'WP_MEMORY_LIMIT', '256M' );<\/strong><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/happyaddons.com\/wp-content\/uploads\/2021\/12\/wp-config-file.png\" alt=\"Edit wp-config file\" class=\"wp-image-37414\" title=\"How to Increase PHP Memory Limit in WordPress (3 Methods) 6\"\/><\/figure>\n\n\n\n<p>Then, save the file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s say you are trying to install a WordPress plugin or add PHP files to your website. But your website fails to load and shows a fatal error message that tells you, \u201cYou don\u2019t have enough memory.\u201d However, you don\u2019t have any idea why it happens and how to solve this problem in the right [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":398,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":1,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":395,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/posts\/393\/revisions\/395"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/media\/398"}],"wp:attachment":[{"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/domainregistrationindia.co.in\/blog\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}