Question

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

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).

Subscribe
Share

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

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.

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