This documentation is only valid for older versions of Wordfence. If you are using Wordfence 7 or later, please visit our new documentation.

Difference between revisions of "PHP Fatal error: Allowed memory size? What does that mean?"

From Wordfence Documentation
Jump to: navigation, search
(Created page with "Occasionally, depending on your site, resources, and plugins and themes you may get a php error that says something like this: '''PHP Fatal error: Allowed memory size of 6710...")
 
(Fix typo, formatting)
Line 3: Line 3:
 
'''PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 491520 bytes)'''
 
'''PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 491520 bytes)'''
  
This is an indication that your memory in '''php.ini''' is not set high enough.  You can define this in your '''php.ini''' file (usually found in '''/etc''' on linux systems - check your documentation for windows servers). Look through he file for a line like this:
+
This is an indication that your memory in '''php.ini''' is not set high enough.  You can define this in your '''php.ini''' file (usually found in '''/etc''' on linux systems - check your documentation for windows servers, which are currently unsupported by Wordfence).
'''memory_limit = 128M'''  
+
 
Keep in mind the 128M is probably different.  That’s the amount of memory that php is allowed to consume.  If you have 10 plugins and combined they consume more memory than you have allocated, you’re going to have problems.  You can assign more by increasing this value.  (my personal sites have 256M allowed, but these are pretty big sites with a substantial number of hits and plugins).  Make sure and restart httpd (apache) after making changes here.
+
Look through the file for a line like this:
 +
'''memory_limit = 128M'''
 +
 
 +
Keep in mind the 128M is probably different.  That’s the amount of memory that php is allowed to consume.  If you have 10 plugins and combined they consume more memory than you have allocated, you’re going to have problems.  You can assign more by increasing this value.  (Some of our personal sites have 256M allowed, but these are pretty big sites with a substantial number of hits and plugins).  Make sure and restart httpd (apache) after making changes here.

Revision as of 14:47, 30 August 2015

Occasionally, depending on your site, resources, and plugins and themes you may get a php error that says something like this:

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 491520 bytes)

This is an indication that your memory in php.ini is not set high enough. You can define this in your php.ini file (usually found in /etc on linux systems - check your documentation for windows servers, which are currently unsupported by Wordfence).

Look through the file for a line like this: memory_limit = 128M

Keep in mind the 128M is probably different. That’s the amount of memory that php is allowed to consume. If you have 10 plugins and combined they consume more memory than you have allocated, you’re going to have problems. You can assign more by increasing this value. (Some of our personal sites have 256M allowed, but these are pretty big sites with a substantial number of hits and plugins). Make sure and restart httpd (apache) after making changes here.