How to Change WP_MEMORY_LIMIT on WordPress 3.1

How to Change WP_MEMORY_LIMIT on WordPress 3.1


The tips and trick How to Change WP_MEMORY_LIMIT on WordPress 3.1 because there's a story behind it 🙂

Today when I'm trying to login to one of my wordpress website, there's an error inside the wp-admin page Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /myphpfile.php on line 127

I tried to Googling how to increase the memory limit that has been set up by WordPress….and the result, all of the tutorial I've got from internet tells that WP_MEMORY_LIMIT is inside wp-settings. I tried to searching into that file but I found nothing!

Actually on WordPress 3.1 the WP_MEMORY_LIMIT configurations is located at wp-includes/default-constants.php

	global $blog_id;

	// set memory limits
	if ( !defined('WP_MEMORY_LIMIT') ) {
		if( is_multisite() ) {
			define('WP_MEMORY_LIMIT', '64M');
		} else {
			define('WP_MEMORY_LIMIT', '96M');

There's the memory limit value to change into your most suitable.

Hope this helps…:-)

(Visited 351 times, 1 visits today)

Share this article if you found it was useful:

Blogger at Love PHP, offensive security and web. Contact him at me[-at-]

See all posts by || Visit Website :