Question

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777224 bytes)

Posted May 29, 2018 1.7k views
PHPUbuntu 16.04

On a Serverpilot Ubuntu apache/nginx install I am trying to install a WP-CLI package called MU-Migration (https://10up.com/blog/2016/streamline-multisite-migration/#comment-813957) from a ssh terminal window but despite having memory_limit = 512M in my apps user.ini I get Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777224 bytes).

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello,

Seems like the php-cli is not picking up the correct php.ini and is still having 256M as its memory limit. What you could do is run:

php -i | grep php.ini

And you would get the correct php.ini file that you should edit.

Regards,
Bobby

Submit an Answer