PHP Fatal error: Out of memory (allocated 20185088)

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

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

/home/username/public_html/wp-content/plugins/wp-affiliateplatform/wp_aff_includes_3rd_party_integration.php

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

/usr/lib/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

:/memory_limit

memory_limit=32M

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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Access cPanel?

cPanel is one of the most popular and widely used control panels. It has a user-friendly...

How to Restrict the Number of Simultaneous Connections to a Server by using FileZilla?

Open the FileZilla Software. Go to File and click on Site Manager. From this section, select...

Learn to Make a PHP Redirect with Safe Methods

A PHP redirect is an extremely useful tool, but it can prove to be dangerous if it is implemented...

Steps to Install Composer on Shared Servers

Composer helps in managing dependencies in PHP. You can declare the libraries your project...

Apache Timeout on the Shared Servers – What Is It?

Mostly the Apache timeout on the shared servers is set to 30 seconds and unfortunately, it can’t...

Powered by WHMCompleteSolution