Support » Fixing WordPress » Fatal error in template.php

  • argh


    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



    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.


    Shane G.



    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.