PHP – How to Resolve Memory Limit Issues in Magento 2.1.7

cpanelmagento-2.1.7PHP

hey guys i have a problem running Meagento commands setup & compile because of memory limit it's 256.

i have requested from the hosting company to increase my memory limit to 1024MB and they did. i can see the change on php.ini file at root folder in cpanel.

but when i ran the commands i got the same errors again of memory limit so i checked the limit with

php -r "echo ini_get('memory_limit').PHP_EOL;"

i found that it is still 256MB. Is there any place where in my Magento that this limit is saved ???

any help please i'm stuck

Best Answer

Try these command:

php -dmemory_limit=1G bin/magento setup:upgrade
php -dmemory_limit=1G bin/magento setup:static-content:deploy
php -dmemory_limit=1G bin/magento setup:di:compile
Related Topic