1. Open the php.ini file
2. Find the line that reads “memory_limit”
3. Change the value to the desired amount of memory
4. Save the file and restart the web server
5. Verify the change by creating a phpinfo.php file with the following code:
6. Open the file in a web browser and look for the “memory_limit” value. It should now reflect the new value.
How to Increase memory limit php Ubuntu