In the post before the last one, I told you about some of the common Wordpress PHP problems that occur due to overload in WordPress due to PHP memory limit. We found that WordPress gets overloaded due to large number of plugins used and various other reasons. This results in loss of some functions and some serious errors. In that post I just told you about the problems. In this post we will discuss about how to change your WordPress PHP memory limit in order to solve these problems.
The reason for these problems is WordPress PHP memory overload. These errors occur when there is less amount of memory granted to WordPress. You may ask which memory? Its PHP memory.
The normal recommended memory that a WordPress blog site should have is 32-64 Mb. For different sites, the recommended PHP memory will differ depending on the site’s usage and the various modifications used in it, like plugins, themes, etc.
How To Change PHP Memory Limit In WordPress?
1. First check the PHP memory limit that your host provides you.
( Follow this article for getting PHP information. Browse to “memory_limit” and see your PHP memory.)
2. If the PHP memory limit you got in the above step is 32 Mb or less, ask your host to change it to 64 Mb or so. I recommend you to to ask them to set it to 128 Mb.
3. When done the above step, go to your site’s root directory.
4. Open wp-settings.php file.
5. Find,
if ( !defined('WP_MEMORY_LIMIT') )
define('WP_MEMORY_LIMIT', '32M');
6. It will be somewhere in the starting of the file.
7. Change the 32M to memory you want. Recommended is 64 Mb or 128 Mb.
( Remember, the memory you use here should be equal or less than php memory you found in the step one.)
8. Save the file.
You WordPress will now have much more memory to use. You dashboard problems will be solved unless there are any other errors and problems in your ite.
Related Blog Posts
Share The Blog Post
Last Updated: February 9, 2012








{ 10 comments… read them below or add one }
Thank you for the sharing this very informative tip.
Its my pleasure. Hope you are enjoying BJ.
Hai to all,
i am getting this error can any one help me out
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /mnt/stor2-wc2-dfw1/433725/438564/movies.hoticecreams.com/web/content/wp-includes/post.php on line 3232
Can you explain me the problem in detail? Like where did it appear, what did you do for it to come and other information? Only then will I be able to help you..
i found it in my subdomain
http://movies.hoticecreams.com/
in this all movies are uploading in this
but inner pages are opeing (http://movies.hoticecreams.com/2010/03/30/thanks-maa/)
Did you edit any file? Was that error coming from before?
This is quite a handy tip and can be a life saver for people who are on shared hosts and have problems running a few wordpress plugins. The other day i came across a guy in DP forum where he was suspended from hostgator for using a few plugins.
:O Suspended from Hostgator? i am sure he must have used some bad plugins like auto blog plugins or spam plugins?
I donno about that. But the guy is pretty confident that his plugins does not consume much of PHP memory. You know I am using XCache on my Bluehost shared hosting and it has helped improve my website performance a lot.
Hmm, PHP memory may not be the case I guess. Many hosts are even against plagiarism tools like auto content generators, spamming tools, etc.