How to increase memory_limit for PHP for Joomla site

Are you hosting your site using Joomla and facing below message-

Fatal Error: Allowed memory size of 8388608 bytes exhausted

This error indicates that php needs extra memory limit for running the script. Most of the Linux/Unix hosting accounts will allow 50M-64M memory limit.

You can increase memory limit by your own without asking your web host. Depending on your host, this can be done in a number of ways with the most likely being php.ini or .htaccess depending on your hosting situation.

1. Create php.ini file in root folder (/public_html) and add memory_limit = 128M to it (assumption, you have access). The file content will look like

memory_limit = 128M
2. Add php_value memory_limit 128M to your .htaccess file in the Joomla root