Welcome to WebmasterWorld Guest from

Forum Moderators: ergophobe

Message Too Old, No Replies

Hiding Fatal Errors on Wordpress

1:49 pm on Aug 16, 2011 (gmt 0)

Preferred Member from GB 

10+ Year Member Top Contributors Of The Month

joined:July 25, 2005
posts: 402
votes: 16


I was wondering if there's a way to display a blank page on Wordpress when a certain script is called out of context.

For example, if I enter
in the browser bar and hit enter, it will say:

Fatal error: Call to undefined function get_header() in /home/myusername/public_html/whatever/wp-content/themes/mytheme/single.php on line X

This is obviously a great way for the offender to sniff out my CP username.

Do I just turn the errors off or what?

4:34 pm on Aug 17, 2011 (gmt 0)

Moderator This Forum

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
votes: 240

You have to set PHP (in php.ini) to *log* errors but not to *display* them. This will result in a blank white page to the user, but you still have the error data for debugging.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members