Title: Fatal error in template.php
Last modified: August 19, 2016

---

# Fatal error in template.php

 *  [argh](https://wordpress.org/support/users/r0dman/)
 * (@r0dman)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-in-templatephp/)
 * I am receiving this error when trying to login to load the wp-admin page.
 * `Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate
   77824 bytes) in /***/wp-admin/includes/template.php on line 354`
 * I was receiving a similar error on my site index.php page, but changed the memory
   limit to 64mb and that is now working fine, but I can’t login to my admin panel
   at all.
 * Any help would be great.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-in-templatephp/#post-1167960)
 * Hi,
 * Check with these options:
 * 1) Either rename/remove Plugins folder via FTP or disables all the Plugins from
   database
 * 2. If you have an access of PHP.ini file of the account/server then change the
   line in PHP.ini where line shows 32M to 64M:
    memory_limit = 64M; Maximum amount
   of memory a script may consume (64MB)
 * 3. If you do not have access of PHP.ini file then add this to an .htaccess file
   of your domain:
    php_value memory_limit 64M
 * 4. Try to add this line to your wp-config.php file to increase allocated memory
   to PHP:
    define(’WP_MEMORY_LIMIT’, ‘64M’);
 * Set your desired memory limit. If all this option can not resolve the issue then
   you need to contact your hosting service provider to resolve this issue.
 * Thanks,
 * Shane G.
 *  Thread Starter [argh](https://wordpress.org/support/users/r0dman/)
 * (@r0dman)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-in-templatephp/#post-1167991)
 * Thanks Shane.
 * I tried part 3 and accidentally overwrote my current .htaccess file. Now when
   I try and view my site it just displays a white page.. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error in template.php’ is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [template.php](https://wordpress.org/support/topic-tag/template-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [argh](https://wordpress.org/support/users/r0dman/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-in-templatephp/#post-1167991)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
