Question
How do I increase PHP memory limit on Ubuntu 14.04
Hi
I am using a 1GB Droplet with current kernel: Ubuntu 14.04 x64 vmlinuz-3.13.0-24-generic (1221)
Using phpinfo() I have identified the currently loaded php.ini file, and have updated the memory_limit attribute to 512M from 128.
This file is /etc/php5/fpm/php.ini
Despite making this change (and of course restarting nginx and php5-fpm services - as well as rebooting the entire server after each change), the value shown in phpinfo() remains at 128M
Other things I’ve tried (again, have rebooted/restarted services):
- Adding the following values to /etc/php5/fpm/php-fpm.conf
php_admin_value[memory_limit] = 512M
php_value[memory_limit] = 512M
Adding a user.ini file in /etc/php5/fpm/conf.d/ (as this directory is scanned for other config files) - and adding the memory_limit with 512M memory
Editing /etc/php5/cli/php.ini to the same 512M value, even though this file isn’t being used.
Adding a php.ini file with the updated memory_limit value inside the root of the web site’s directory
I am absolutely stumped, and if someone can offer any insights or further troubleshooting steps, I would be greatly appreciative!
Thanks
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.
×