WordPress Security Tip: Get Rid of Hello.php!

Friday, March 20th, 2009

Today we will cover a quick WordPress security tip. The other day while I was browsing some wordpress security notes, the article mentioned adding an index.html file to your plugin folder to prevent anyone from snooping around your directory. This is an excellent tip, but not the one we will cover today.

The Problem

The problem I realized (and I am not claiming I am the first to notice this, but I have never read this anywhere before) is that hello.php is included with every version and download of WordPress. The actual plugin is fine, and has no security holes to speak of, but the problem is that a lot of people don't delete this file (assuming they are not using it).

Why is this a problem?

Well, if a not so ethical user knows that every version of WordPress comes with the hello.php plugin file, he/she can simply navigate to http://yoursite.com/wp-content/plugins/hello.php. The security issue here is that when the user directly accesses the url as seen in the previous sentence, then most likely an error message will be displayed with your full server path exposed. This is not a good thing, you do not want people knowing your servers full path, this gives theme insight and more information about your server and increases the chance of a hack/crack.

I visited a lot of very popular sites that I know that run WordPress and was amazed to see how many errors I could produce and full server paths I was able to find. In addition, I was able to browse the parent directories of a lot of blogs by simply going to http://yoursite.com/wp-content/plugins/.

What to do?

  • Remove hello.php assuming you are not using it. If you are then rename it something unique.
  • Add a blank index.html file to your plugins and theme folder (credit to Prelocav for this tip).

I am considering looking more into this and possibly starting a ticket or thread to see if WordPress will do anything about this, it really is a pretty obvious security issue. I know they won't want to remove hello.php from future versions, but besides telling people to delete or rename it, I don't see many alternatives. What do you guys think?


If you enjoyed this article, you might consider subscribing to our rss feed to stay updated with all the latest tips and articles!

ABOUT THIS AUTHOR

Hi, I'm Drew Douglass and I make sure Dev-Tips.com runs smoothly. I also work for Envato Support and write for NETTUTS.com and ThemeForest.net. I'm passionate about anything web development related, especially php, WordPress, MySQL, and jQuery. Feel free to follow me on twitter.
  1. March 20, 2009 at 7:49 pm
    • March 20, 2009 at 7:58 pm
  2. Meshach
    March 21, 2009 at 12:33 pm
    • March 21, 2009 at 6:03 pm
      • March 23, 2009 at 9:37 am
  3. March 21, 2009 at 2:29 pm
    • March 21, 2009 at 6:03 pm
  4. March 21, 2009 at 5:39 pm
    • March 21, 2009 at 6:04 pm
  5. March 21, 2009 at 9:42 pm
    • March 22, 2009 at 2:52 pm
  6. March 22, 2009 at 11:23 pm
    • March 23, 2009 at 9:38 am
    • May 1, 2009 at 2:03 pm
  7. March 23, 2009 at 11:51 am
    • March 23, 2009 at 11:58 am
      • March 24, 2009 at 7:50 am
      • March 24, 2009 at 2:17 pm
  8. March 24, 2009 at 10:44 pm
  9. March 30, 2009 at 10:50 am
    • March 30, 2009 at 1:41 pm
  10. April 10, 2009 at 10:21 pm
  11. Rushabh
    November 25, 2010 at 3:30 am
  12. January 5, 2011 at 8:22 pm

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Popular Series

Output Buffering Articles
Build a Custom AJAX and PHP Contact Form
The Ultimate Image Gallery Manager.
ThemeForest Premium Site and WordPress Templates