Increasing PHP memory limit
Last updated
Last updated
You can find the current PHP memory limit from the ExpressionEngine 2 Control Panel
Go to: Tools > Utilities > PHP Info and search for the line “memory_limit”

the first value (in the “Local” column) will tell you the current memory limit
Depending on your web hosting, you may be able to increase your memory limits. Some hosts will not allow this, or will limit the maximum amount of memory you can set. I’ve found some hosts are willing to set quite high limits if you explain it will be for a one-off data import and that it can be lowered again afterwards.
Your web hosting service will be able to tell you the appropriate way to increase you memory limit, but here is a summary of the options.
.htaccess
This is my preferred method as it makes it easy to set values of a site-by-site basis, but will not work under all hosting configurations. In a .htaccess file in the root of your website, add the line:
This will give you a memory limit of 128M.
php.ini
If you are able to edit the server’s php.ini file you can modify the the memory limit there. Look for the line:
and adjust the value accordingly. This will apply to all sites.
You may also be able to create/modify a php.ini in the website’s root folder.