wp-cli / profile-command

Quickly identify what's slow with WordPress
MIT License
266 stars 29 forks source link

PHP Fatal error: Allowed memory size on install package #165

Closed mgip closed 3 years ago

mgip commented 3 years ago

Loading composer repositories with package information Updating dependencies PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 86 bytes) in phar:///var/www/vhosts/***.com/wp-cli.phar/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php on line 588 Reverted composer.json. WP-CLI ran out of memory. Please see https://bit.ly/wpclimem for further help. [root@servidor]# env PATH="/opt/plesk/php/7.2/bin/:$PATH" ./wp-cli.phar package install git@github.com:wp-cli/profile-command.git

Help!

Thanks

--------------^ Click "Preview" for a nicer view!

GitHub issues are meant for enhancement requests and specific, reproducible bugs, not for general support questions. For support options, please review http://wp-cli.org/#support.

The easiest way to get support is to join us in the #cli channel on the Make WordPress Slack Team.

bgturner commented 3 years ago

You'll need to visit that link that's mentioned in the output:

WP-CLI ran out of memory. Please see https://bit.ly/wpclimem for further help.

That url resolves to this WP make post: https://make.wordpress.org/cli/handbook/guides/common-issues/#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes

Basically, because Composer (what wpcli uses to manage packages) is such a memory hog, you'll need to increase the amount of memory that is allocated to PHP.

That specific process is different for each host, but from the output in your message, this site is using Plesk, so you should be able to increase the memory by following this guide: