Adjusting the PHP Memory Limit for WordPress

If you find that certain modules in your WordPress installation are generating memory errors, you can adjust the amount of memory that PHP is allowed to use in WordPress.

Edit the wp-config.php file in your WordPress root folder and add the following line:

define(‘WP_MEMORY_LIMIT’, ’64M’);

You would adjust the “64M” value to match the amount of memory you require.

Note that WordPress will normally attempt to allocate 32M of memory for PHP, so the value you set here should be more than 32M. Also note that this setting does not affect any other scripts on your site–it only affects WordPress.

Was this article helpful?

Related Articles

Leave A Comment?