Update from 15.07 to 16.04 results in memory limit errror


Apologies if this isn’t the right topic.

I’ve upgraded from 15.07 to 16.04, added my missing indices and I’m now attempting to remove this error:

“The PHP memory limit is below the recommended value of 512MB”

I’ve run php -v and confirmed:

PHP 7.3.5-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 3 2019 10:00:05) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.3.5-1+ubuntu16.04.1+deb.sury.org+1, Copyright © 1999-2018, by Zend Technologies

Altered this file:


And set the following:

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 1024M

After restarting apache2, I still see the memory warning. I can see this type of error over the forums, but no clear solution as some are using snap (which I’m not) and some others haven’t found a solution.

I didn’t see this error before I upgraded

Any help would be greatly appreciated

Hmm. That worked for me. Not sure why it wouldn’t for you. Run this command:

locate php.ini

To find other instances of the php.ini file - it might give you a clue as to what’s going on and/or what you might change? Possibly the cli version?? Good luck.

Hi @charlienz,

Are you using php-fpm?

fist do php -v to verify witch php your using.

Then, accordingly, modify your php.ini in ALL section.
To avoid config being erased at each upgrade, create local.php.ini files if needed.

Sometimes, an apache2 stop/start ( not a restart or a reload !!! ) don’t even work.
Reboot may be nescesary

Locate returns:


When I look at the PHP version selected:


Php -v

and as www-data

Scrap this, ran an apt autoremove and it’s good now. Suspect something may have been lingering

1 Like

Ok. Good.
You have 3 versions and 7.3.5 is the good one

Usually, the good php.ini are located under:
/etc/php/7.3 and then /apache2 /cgi /fpm /cli
Modify All four php.ini

Apache2 restart… Sometimes a reboot is needed