Solution for Fatal Error: Allowed Memory Size Exhausted

This example gives you the solution for Fatal Error allowed Memory Size Exhausted which causes to stop application running all of sudden. I have purchased the GOOD DOMAIN Hosting w/ Cpanel and tried to install various WordPress plugins to make my website more flexible to users with  design and content

However I got this error when I tried to activate the plugins:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in /home/pangko/public_html/wp-admin/includes/menu.php on line 65

Sometimes the error will be like below:

Fatal error:  Cannot use output buffering in output buffering display handlers in Unknown on line 0

I did my research which lead me to changing my wp-config.php by adding this line at the bottom before change limit comment:

<?php
define( 'WP_MEMORY_LIMIT', '256M' );
?>

However it still doesn’t work, I am helpless when i see this error in my WordPress admin panel.

cpanel php change memory limit

Later i have followed below steps to change my memory limit in Cpanel of our hosting then it works out without hustle.

  • Login to your hosting cpanel.
  • Then go to  software section and  select php version then it will redirect you to the new window which shows you the version of the PHP you use . Check the above screenshot for reference.
  • Click on it if its show 5.4 native select other version like 5.6 then click on set as current.
  • Then click save, after that you have to click on the link on the right of the screen ( Switch To PHP Options ) find memory_limit and change it to the limit you want (click on the value ). Below is the screenshot for reference.

change php memory limit

You may also like...