How to fix Fatal error: Allowed memory size of in wordpress

Amazon You Don’t Know JS: Up & Going 1st Edition
April 10, 2017
Eloquent JavaScript: A Modern Introduction to Programming 2nd Edition
April 11, 2017

How to fix Fatal error: Allowed memory size of in wordpress

Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 131073 bytes) in /home/yourwebsitename/public_html/wp-content/plugins/gravity-forms-pdf-extended/vendor/blueliquiddesigns/mpdf/classes/ttfontsuni.php on line 4582

 

How to fix Fatal error: Allowed memory size of in wordpress so today at work I needed to fix an memory error that wasn’t allowing folks to to submit a forum via by gravity forms. I found a simple solution after a few hours of reading line by line of code, I found if you do to default-constants.php
and look for the lines that look like this

if ( !defined(‘WP_MEMORY_LIMIT’) ) {
if ( is_multisite() ) {
define(‘WP_MEMORY_LIMIT’, ‘40M’);
} else {
define(‘WP_MEMORY_LIMIT’, ‘40M’);
}
}

and change them to this

if ( !defined(‘WP_MEMORY_LIMIT’) ) {
if ( is_multisite() ) {
define(‘WP_MEMORY_LIMIT’, ‘128M’);
} else {
define(‘WP_MEMORY_LIMIT’, ‘128M’);
}
}

This is a super simple fix for those who are comfortable going into cpanel and WordPress codes. If not please give me a ring or shoot me a email.

 

Leave a Reply

Your email address will not be published. Required fields are marked *