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:
1 | memory_limit = 32M ; Maximum amount of memory a script may consume (32MB) |
2. If you don’t have access to PHP.ini try adding this to an .htaccess file:
1 | php_value memory_limit 32M |
3. Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP
1 | define('WP_MEMORY_LIMIT', '32M'); |
4. Talk to your host.
Also, make sure you use ASCII transfer mode when FTPing files to your host

