Magento 2 – Fix Fatal Error ‘Allowed Memory Size’ During Static Content Deploy

-setupdeploymagento2memory

I am trying to setup Magento 2.0 (community) in a WAMP server and I am getting the error below all the time while I run the command for deploy the assets static due to symlink issues at Windows environments:

php bin/magento setup:static-content:deploy

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in C:\wamp\www\magento\vendor\oyejorge\less.php\lib\Less\Visitor\processExtends.php on line 445

I have setup memory_limit as -1 (no limit) but this takes no changes. I don't know what else to do in this case since the issue goes beyond my PHP knowledge and setting that value to no limit should do the job unless I need to install something else to get this working. Any advices? Any workaround?

Best Answer

quick solution add memory size in the command :

php -dmemory_limit=6G bin/magento setup:static-content:deploy

change 6G to what you want