Allowed Memory Size Exhausted
I started getting the following errors on the frontend of a WordPress site:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in /home/aginginoudoun/public_html/wp-admin/includes/theme.php on line 523
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3072 bytes) in /home/aginginoudoun/public_html/wp-content/plugins/sabai/lib/Sabai/Addon/System/Model/Base/AddonGateway.php on line 81
A Google search indicated that the software was reaching a PHP memory limit, so I ran a phpinfo.php and saw that both local and master memory was 64M. Further reading advised creating a .user.ini file, put the following line in it: memory_limit = 256M, and place the file in the public_html folder. So I did this, and ran phpinfo again and saw that local memory was now 256M and master was still 64M. Supposedly the local overrides the master value.
Tested the website again, and no more fatal errors!
P.S. Don’t forget to remove your phpinfo.php file from the site.