I am trying to update memory_limit in php.ini, but I don’t see the value updated in phpinfo(). Here is the ini file path info from phpinfo():
Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini
Updated /etc/php.ini and then ran:
systemctl restart httpd
I tried updating other values in ini file to see if anything gets updated, but nothing does.
I am on an AWS EC2 linux instance with wordpress.
Advertisement
Answer
Many modern PHP installations run PHP-FPM by default, instead of as an Apache module mod_php. PHP-FPM is itself a separate service that needs to be restarted via your operating system’s preferred method. e.g.
$ sudo systemctl restart php-fpm
You mentioned you already knew which php.ini to modify from the phpinfo()
output. For future readers, the PHP-FPM service may use a different php.ini. Consult the output from phpinfo()
when loaded via the web to find out which php.ini to modify.