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

May 29, 2018 1.5k views
PHP Ubuntu 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).

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

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!