Fixing PHP Memory Errors in Magento Updated on October 4, 2023 by Carrie Smaha 1 Minutes, 2 Seconds to Read Magento can be quite memory intensive due to its robust design. You can adjust the memory limits to reduce or eliminate the memory errors altogether. You’ll have to add code to 2 separate files and we’ll walk you through the process using the file manager in cPanel. Log into cPanel and open File Manager In the top right corner of your File Manager, click on Settings. Navigate to the root folder for your Magento Installation. Right-click on the index.php file by right-clicking on the file and selecting Code Edit Click OK Add the following line after the first line of code: ini_set("memory_limit","512M"); Click Save Changes in the upper right corner Go back to File Manager and open the app/Mage.php file with the code editor in the same manner you opened the index.php file above After the first line of code add the following line of code: ini_set("memory_limit","512M"); Click “Save Changes” in the upper right corner At this point you should be able to re-load your website and the errors should no longer appear on your pages. If you need further assistance on Hosting for Magento, please feel free to ask a question on our Support Center. Share this Article Carrie Smaha Senior Manager Marketing Operations Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth. More Articles by Carrie Related Articles 10 Magento Security Tips Changing the Magento 1.6 Login to Case Sensitive How to Allow Backorders in Magento 1.6 Changing the Year-To-Date Report Dashboard in Magento 1.6 Adding Store Email Addresses to Magento How to stop Displaying Product Reviews in Magento 1.6 How to Install Magento Manually Merging Javascript Files in Magento 1.6 How to Edit the Footer in Magento 1.6 Changing the Default Welcome Message in Magento 1.6