Why am I hitting the php memory limit?
-
Hello everyone. I am attempting to troubleshoot some memory limit issues I’m having with WordPress.
My client’s original site is running WordPress 3.7. They have reported errors (though they have not appeared for me in the week I’ve been looking at it) and some of their plugins have not been working for a while now. Not wanting to break their existing site I decided to make a development mirror on the same server.
Unfortunately this resulted in memory limit errors on the test site. The host has it set to 32MB, which seems to work fine for the live site, but not for the test site. This immediately struck me as odd, since they’re the exact same code.
To resolve this I attempted a fresh install (using 3.9.2) and sure enough it started just fine without errors, but once I started adding plugins multiple of them gave the same error, bumping into that 32MB limit.
Plugin could not be activated because it triggered a fatal error. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home/user/public_html/dev/wp-content/plugins/events-manager/em-functions.php on line 173
WP is installed to a subdomain which points at /home/user/public_html/dev/ in cpanel.
I suppose my questions for you are, why do the memory errors happen on the dev site and not the live site? How can I bring the memory usage down? What are some troubleshooting steps I could take in this situation?
I notice the most common answer on these forums is to ask the host to raise the limit, but I’d rather see if I can resolve the issue without raising the limit first.
- The topic ‘Why am I hitting the php memory limit?’ is closed to new replies.