Posted by Simon Goodchild at July 10th, 2012
More a general note about WordPress that you may find useful if you come across the PHP error “Solve PHP Fatal Error: Allowed memory size of 8388608 bytes exhausted”. I doubt the number will be the same, but the error certainly will be, and have a similar effect to it has on me when I see it. That is, ugh, what the flip?
However, panic yee not. There are two things to look at that can resolve memory limit problems.
First in your PHP.INI file (contact your hosting company for more info on where your site’s PHP.INI file is) is a setting which can be changed. The file can be edited with a text editor, search for:
ini_set("memory_limit","12M");
and increase the 12M (or whatever yours is set at) to a higher value. M stands for megabytes.
The second place, which solved my memory limit problem after hunting around Google is as follows. It’s a part of the WordPress installation. The following exists in wp-includes/default-constants.php which can also be edited with a text editor and changed accordingly:
// set memory limits
if ( !defined('WP_MEMORY_LIMIT') ) {
if( is_multisite() ) {
define('WP_MEMORY_LIMIT', '64M');
} else {
define('WP_MEMORY_LIMIT', '32M');
}
}
if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
}
Again, the M stands for mega-bytes.
Category: Tips and Tricks
Post Tagged with memory limit 



Saving...
Leave a Reply