Title: Call to undefined function get_header()
Last modified: August 19, 2016

---

# Call to undefined function get_header()

 *  Resolved [Jakets](https://wordpress.org/support/users/jakets/)
 * (@jakets)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-get_header-4/)
 * I have been getting the following error for a long time now. I have Googled it
   on many occasions and I know the standard answer is that your theme is in the
   wrong place. My site works fine and I have never had this error show for myself,
   but consistently every day i have hundreds of lines of this error in my error
   log. My theme is exactly where it should be and there are no theme files in the
   main directory. What could be causing this and how can I fix it? Clearly the 
   site is functioning and the header IS defined as far as I can tell. The only 
   notable thing I can think of is the fact my WP install is in a directory (/blog)
   and being run from the main folder.
 * The site is here: [http://farmvillefanatic.com/](http://farmvillefanatic.com/)
 * PHP Fatal error: Call to undefined function get_header() in /home/jakets/public_html/
   blog/wp-content/themes/exile/index.php on line 1
 * Other than this my site runs flawlessly, I would love to fix this. Thanks!

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

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-get_header-4/#post-1491335)
 * That’s nothing to be worried about. You’re only seeing this in your error log
   because some bots and some incredibly lost people are trying to access your site
   at `/blog/wp-content/themes/exile/index.php` .
 * The error is entirely normal for that location since theme functions are designed
   to be called from the blog directory, not from the theme directory.
 * You can limit the bot access to your theme files by creating a text file titled`
   robots.txt` in your main directory with the following content:
 *     ```
       User-agent: *
       Disallow: /blog/wp-content/themes/
       ```
   
 *  Thread Starter [Jakets](https://wordpress.org/support/users/jakets/)
 * (@jakets)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-get_header-4/#post-1491336)
 * Thanks! I downloaded and installed PC Robots.txt and modified it slightly (adding/
   blog in front of each). It actually had a bunch of locations to disallow already
   in it for other areas of the blog that I get some errors for. I appreciate the
   help, I was starting to worry about getting that error so often, hopefully this
   will take care of it. 🙂
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-get_header-4/#post-1491339)
 * You’re welcome!

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

The topic ‘Call to undefined function get_header()’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-get_header-4/#post-1491339)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
