bash
Back to Snippets
Composer Memory Limit Fix
Fix 'Allowed memory size exhausted' error when running Composer.
bash
# Run Composer with unlimited memory
php -d memory_limit=-1 composer.phar require "package/name:^1.0"
# Or with global Composer
php -d memory_limit=-1 $(which composer) install
# Set permanently in php.ini
# memory_limit = -1