Knowledgebase

Apr
13
Posted on 13-04-2011
Filed Under (PHP Memory Limit and WordPress) by bodhost

If your WordPress blog is slow and you are getting an error that display not enough memory to run present script, then you should read this article. This kind of error normally appear while updating the WordPress Blog. The actual reason behind this error is, assigned PHP memory size for the WordPress blog is exhausted. Even if you are using localized WordPress installation, then logs memory compared to basic version (English) of WP installation demands more memory, and sometimes simple call to .po/.mo files generates extra load over RAM.

You can solve above issue by using setting tweaks, but these steps are only applicable for WordPress, not for other applications. Back to the main topic, you can also check the memory status by using wp-settings.php. The default size of memory is 32 MB and to increase it, you will have to edit wp-config.php.

In addition, WordPress usually automatically check if PHP has been assigned less memory than the value before using this functionality. For an instance, if PHP has been assigned 96MB, there is no need to set this value to 96M, because WordPress will use 96MB memory automatically if it is required.

One more thing, this setting may not work if your hosting account do not have sufficient privileges to increase PHP memory. In this situation, you need to contact support department to discuss concern issue.

You should use below lines to increase PHP Memory for WordPress.

  • define(‘WP_MEMORY_LIMIT’, ’64M’);
  • define(‘WP_MEMORY_LIMIT’, ’96M’);
  • define(‘WP_MEMORY_LIMIT’, ’128M’);

Comments Off    Read More