Fatal error : Allowed Memory Size of 134217728 bytes Exhausted On WordPress – How I Fixed it

A web page on one of my websites powered by WordPress has not been accessible for some weeks now. So yesterday, I decided to check what might be the cause. I signed in to cPanel, checked the error log and discovered that it has been throwing the php “Allowed memory size error” that reads :

“PHP Fatal error :Allowed memory size of 134217728 bytes exhausted (tried to allocate xx bytes) in /home/xxxxx/public_html/wp-includes/meta.php on line 838”

After googling the error, I discovered that it is one of the common WordPress errors, which can simply be fixed by increasing the memory limit set in the php.ini or  the wp-config.php file.

I changed the limit in wp-config.php from 128M to 512M but failed to resolve the problem.

I set  the cPanel “File Manager” to display hidden files, yet couldn’t find the php.ini file. So, I contacted my host to help me increase the memory limit in the php.ini file.

Guess what?

The error was fixed after the support staff created the php.ini file for me and increased the memory limit to 512M as seen in the screenshot below :

increase memory limit in php.ini file

So, if you can’t fix the error by editing the wp-config.php file, try editing the php.ini file.

NB:

1. You can check for errors via file manager, public html > error log.

2. php.ini file is located in cPanel -> File Manager -> public_html folder. If not there, ask your host to add it for you. The support staff told me that he added it to mine by adding the code below to the .htaccess file :

See also :   Selective Tag Cloud Widget Plugin Lets You Select Tags To Show in WordPress Sidebar

<IfModule mod_suphp.c> suPHP_ConfigPath /home/MycPanelUsername/public_html </IfModule>

enable php ini in web host cpanel folder

I hope this helps.

Please Share :

Written by Jide Ogunsanya

Pro Nigerian Blogger, Digital Marketer and Web designer. I help business owners to grow their businesses online. You can join my Facebook Group here.

Leave a Reply

We're glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy. Your email address is required but will not be published. No keyword stuffing in the name field and commenting from blah blah blah makes no sense. Thank You.

  • We can help you buy items from Amazon USA and ship to NigeriaMore Info
  • Do you want to ask some questions?Click To Ask

Zamzar Lets You Convert Files Online For Free

Infinix Note 3 Is The Most Searched for Android Smartphone of 2016 in Nigeria