{"id":621,"date":"2024-06-17T08:06:32","date_gmt":"2024-06-17T08:06:32","guid":{"rendered":"https:\/\/zalvis.com\/docs\/?p=621"},"modified":"2024-06-17T08:07:18","modified_gmt":"2024-06-17T08:07:18","slug":"how-to-increase-your-php-memory-limit","status":"publish","type":"post","link":"https:\/\/zalvis.com\/docs\/how-to-increase-your-php-memory-limit.html","title":{"rendered":"How to Increase your PHP Memory limit"},"content":{"rendered":"<p>PHP allocates a certain amount of memory when executing PHP scripts. When the allocated memory is exhausted, the PHP script shows a fatal error:<\/p>\n<blockquote><p>PHP Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy) in yourscript.php<\/p><\/blockquote>\n<p><strong>Please note that the memory_limit value should be set to at least as big as post_max_size.<\/strong><\/p>\n<p>Follow these steps to increase memory_limit in cPanel<\/p>\n<ul>\n<li>Log into your cPanel from within your Zalvis client account<\/li>\n<li>Locate and <strong>Select the PHP version<\/strong> menu in the <strong>Software<\/strong> section<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-622\" src=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8239.png\" alt=\"\" width=\"768\" height=\"384\" srcset=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8239.png 768w, https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8239-300x150.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<ul>\n<li>Click the <strong>Options<\/strong> section for the php.ini values and scroll down to <strong>memory_limit<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-623\" src=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8240.png\" alt=\"\" width=\"782\" height=\"450\" srcset=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8240.png 782w, https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8240-300x173.png 300w, https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8240-768x442.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/p>\n<ul>\n<li>Set the value to what you want. Once you have done the change make sure that you do a left-click anywhere outside the text input or drop-down box.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-624\" src=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8241.png\" alt=\"\" width=\"784\" height=\"446\" srcset=\"https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8241.png 784w, https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8241-300x171.png 300w, https:\/\/zalvis.com\/docs\/wp-content\/uploads\/2024\/06\/IMG_8241-768x437.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/p>\n<ul>\n<li>You will see a green box with a message that will confirm that the change you\u2019ve made has been applied.<\/li>\n<\/ul>\n<p>You can confirm whether your changes have got into effect by creating a PHP info.php file. To create an info.php file, Follow the steps in this <a href=\"https:\/\/zalvis.com\/docs\/how-to-create-a-phpinfo.html\">guide<\/a>.<\/p>\n<div class=\"muqvn6a05e9c61ccbf\" >If you enjoyed this article, then you\u2019ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24\/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! <a href=\"https:\/\/zalvis.com\/\">Check out our services.<\/a><\/div><style type=\"text\/css\">\r\n@media screen and (min-width: 1201px) {\r\n.muqvn6a05e9c61ccbf {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 993px) and (max-width: 1200px) {\r\n.muqvn6a05e9c61ccbf {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 769px) and (max-width: 992px) {\r\n.muqvn6a05e9c61ccbf {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 768px) and (max-width: 768px) {\r\n.muqvn6a05e9c61ccbf {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (max-width: 767px) {\r\n.muqvn6a05e9c61ccbf {\r\ndisplay: block;\r\n}\r\n}\r\n<\/style>\r\n","protected":false},"excerpt":{"rendered":"<p>PHP allocates a certain amount of memory when executing PHP scripts. When the allocated memory is exhausted, the PHP script shows a fatal error: PHP Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy) in yourscript.php Please note that the memory_limit value should be set to at least as big as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-621","post","type-post","status-publish","format-standard","hentry","category-cpanel-hosting"],"_links":{"self":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/comments?post=621"}],"version-history":[{"count":3,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/621\/revisions"}],"predecessor-version":[{"id":627,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/621\/revisions\/627"}],"wp:attachment":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/media?parent=621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/categories?post=621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/tags?post=621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}