Fixing PHP memory errors in Magento

In this article we will show you how to adjust the memory limits of Magento website to reduce or eliminate the memory errors all together.

For this Login to your cPanel

Go to your File Manager

Navigate to the root folder for your Magento Installation

Right click on the “index.php” and select “code edit”

Click OK and add the following line after the first line of code:

ini_set("memory_limit","512M");

Click “Save Changes

Go back to File Manager and open the app/Mage.php file with the code editor.

After the first line of code add the following line of code:

ini_set("memory_limit","512M");

Click “Save Changes

Now re-load your website and the errors should no longer appear on your website pages.