18 January 2010 View Comments

WordPress Fatal error: Allowed memory size of 16777216 bytes exhausted


I received a message like this

"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 30720 bytes) in /usr/home/web/web276672/lan/wp-admin/includes/template.php on line 3186"

This is how I solved it (dirty quick solution).

It’s likely not a problem with your database, but rather a need for more PHP memory. Methods for increasing the amount of memory a PHP script may consume:

1. If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 16M try 32M: [cc]memory_limit = 32M ; Maximum amount of memory a script may consume (32MB)[/cc]

2. If you don’t have access to PHP.ini try adding this to an .htaccess file: [cc]php_value memory_limit 32M[/cc]

3. Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP [cc]define(’WP_MEMORY_LIMIT’, ‘32M’);[/cc]

4. Talk to your host.

Also, make sure you use ASCII transfer mode when FTPing files to your host

blog comments powered by Disqus