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.
Worked . Thanks !
Great Article!
Saved my life! 🙂
THANK YOU!!!
Thanks for sharing the tip!! Saved me!
Great, worked like a charm! Thanks for sharing the tip!!
thank you very much….this article just saved my job………thanks a lotttttt