Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Shared Hosting FAQ  >  PHP Fatal error: Out of memory (allocated 20185088)
Top Scroll

PHP Fatal error: Out of memory (allocated 20185088)

 2 min

After installing/upgrading the WordPress the following error might occur:

PHP Fatal error: Out of memory (allocated 20185088) (tried to allocate 12288 bytes) in


On line 300

This error occurred as your account exceeded the allocated memory, to solve this issue you should increase the memory_limit for this account.

How Can I Increase It By Using SSH ?

Login to the server through SSH and then find the php.ini file on the server with the command mentioned below :

# php -i | grep php.ini


This command helps you to find the location of php.ini file on server. Open this file with your preferred editor.

# vi /usr/lib/php.ini



Increased it to 64 or as per your requirement and save the file with : ‘wq’

Restart the httpd service.

#/etc/init.d/httpd restart

How to Increase PHP memory limit in WHM ?

Go to Service Configuration >> PHP Configuration Editor

Change the value from 32M to 64M or 128M on memory_limit row.


For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.