Admin-Ahead Community

General Category => General Discussion => Topic started by: sajugovind on December 27, 2013, 06:56:30 pm

Title: Increasing memory allocated to PHP-wordpress
Post by: sajugovind on December 27, 2013, 06:56:30 pm
Increasing memory allocated to PHP

The WP_MEMORY_LIMIT option  allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as "Allowed memory size of xxxxxx bytes exhausted".

This setting increases PHP Memory only for WordPress, not other applications. By default, WordPress will attempt to increase memory allocated to PHP to 40MB (code is at beginning of wp-settings.php), so the setting in wp-config.php should reflect something higher than 40MB.

Increase PHP Memory to 64MB

define( 'WP_MEMORY_LIMIT', '64M' ); in wp-config.php

When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.

define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Please note, this has to be put before wp-settings.php inclusion.