One Simple Way to Protect Your WordPress Plugins
I’m amazed that so many popular bloggers use WordPress and don’t protect their WordPress plugins. Here’s one simple way to protect people from seeing exactly which WordPress Plugins you’re using.
First, here’s a little background about it: If you don’t have a default web page (usually index.html or default.html or something similar) in each of your web site’s folders, then people can gain direct access to that folder’s contents by accessing it in a web browser. For example, try going to www.yourdomain.com/images/ in your favorite browser. See what I mean? You’ll most likely see a list of all the files in that folder. For most people, seeing the image files in your images folder is not a big deal. In fact, I even let people see the files I have in my images folder. No big deal.
But what if folders in your installed apps are open?
That’s right. What if there are key folders in applications or scripts that are left open for everyone to view? Exactly–they can view all the files in that folder (or directory).
Like me, you may be proud of the different WordPress plugins that you are using if you’re using WordPress to power your site or blog. Did you know that a default installation of WordPress actually doesn’t protect your WordPress plugins folder? Well, it doesn’t! So, most likely, people can go here and view all of the plugins you have installed, even some custom ones if you’re using them:
www.yourdomain.com/wp-content/plugins
Try it now on your own WordPress-powered site or blog. There’s a good chance that you’ve left yourself wide open. And if you’re using an anti-spam plugin then people can see which one(s) you’re using. Not good.
To be honest with you, I kind of stumbled across the fact that most people have their plugins open for everyone to view. I was interested in a certain blogger’s plugins so-to-speak and which ones they were using because I kept seeing some additional pings and additional links to his blog (yes, this blogger shall remain nameless, but you know who you are if you’re reading this post!). I actually checked some (ahem) other popular bloggers, even bloggers in the Technorati 100 and they’ve left their plugins folder wide open.
So, if you’re reading this, here’s (finally) the way to protect your WordPress plugins from being viewed by snoops:
Copy the following code and paste it into notepad or whatever text editor you use:
Save the file as index.html and upload that file to your blog’s wp-content/plugins folder. Voila! Fixed! Now you have to FTP into that folder or go to the Admin section of your blog in order to view the plugins you’re using.
If people view your WordPress plugins and see which ones you have installed, then it may not actually be a big deal to you. But, if you’re like me and you use certain plugins to add certain functionality to your WordPress install, then most likely you will not want people snooping around, looking at all of the WordPress plugins that you have installed.
Related posts:
- Web Hosts Hijacking 404 Error Pages on Live Web Sites Some web hosting companies have now taken it to a new low: they are monetizing (making money) from your web site without your knowledge. Web...
- FTC Says Bloggers Must Disclose or Face Stiff Penalties In what I believe is a surprising decision, the Federal Trade Commission decided that they will require bloggers to “clearly disclose any freebies or payments”...
- The 11 Types of Alexa Hot URLs and How to Get There Alexa is a subsidiary company of Amazon.com typically known for its rankings of websites. The Alexa Toolbar collects data on the web browsing behavior...
- How to Promote the Perfect Blog Post As you might recall, a while back I told you how to write the perfect blog post. Now that you’ve written the blog post and...
- New Leapfish Demo Brings Even More Search Engine Power To The Table Not too long ago, LeapFish unveiled a demo of it’s new multi-faceted search engine to the public, and it was received with warm reviews,...

Jun 19th 2007
OR, if you are on an Apache server (most likely you are), open your favorite text editor and type:
Options -Indexes
Save the file as .htaccess — don’t forget the period at the beginning — in the folder. Now, you’ve turned off directory viewing all together and anyone who tries to view your plug-ins will get an error message.
OR, since you’re running Wordpress, you’re also running PHP, so open your favorite text editor and type:
Save the file as index.php in your plug-ins folder. Now, when someone tries to view the folder, they’ll be redirected to your home page.
Jun 19th 2007
Oops, some of my code got lost. Not thinking.
The code for index.php would be:
<?php
header( ‘Location: http://www.yoursite.com‘ ) ;
?>
Jun 19th 2007
I just tried this on the wordpress installs I have and got a 403 on all of them. I guess the moral of the story is that good writers aren’t security experts.
Jun 20th 2007
Arlo, thanks for mentioning this. That’s definitely a good fix for it, as well. I wasn’t aware that you could add that command to the .htaccess file like that. Cool!
Jun 20th 2007
Hey Bill,
Thanks, that’s a great tip – and a very simple fix.
Have an awesome day!
Dan & Jennifer
Jun 20th 2007
Thanks, Bill! This is a great bit of information — and one that slipped completely under my radar before you brought it to my attention.
Can’t thank you enough and will be sharing your blog with my own readers when I finish a posting of MUST HAVE WordPress gadgets.
Thanks again — now I’m not sharing any more of my “gadgets” than I want to share!
Jun 26th 2007
That’s awefully nice of you to give everyone a way to add a backlink to your website on their blog.
Seriously, I’ve never even thought about it. Thanks for the tip. I’ll be patching my installation ASAP.