Magento 2 run setup:di:compile command on a shared hosting with limited memory_limit (max 512M)

by Vivek Shingala   Last Updated August 28, 2018 02:09 AM

I am trying to execute php bin/magento setup:di:compile after enabling a custom module created on my Magento2 store. However, I am using a shared hosting which allows me to set memory_limit upto 512 MB.

Due to this compile command fails. How to run Magento 2 commands successfully on shared hosting with limited memory_limit?

[ym@webcloud1 testbed]$ php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 54.0 MiB Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

Suggestions much appreciated.



Related Questions



Memory usage high for specific time?

Updated September 06, 2018 11:09 AM

Magento 2.x PHP memory_limit requirements

Updated October 01, 2018 16:09 PM

Magento 2 - setup:di:compile

Updated July 18, 2017 09:09 AM