Online Casino In Usa For Mac Las Vegas Online Casino With No Download Instant Play Casino Slots No Download Best Slots Around The World No Download Slot Machines Games Flash Casinos Usa Players Online Casinos No Downloads Best Top Usa Casinos Online New Casino Sign Up Bonuses Casino Sign Up Bonus Us Players Us Blackjack Bonus Code American Online Slots Promotion Codes For Online Casinos Brand New Online Casino Video Bonus Slots European Roulette Online In The Us Play Real Money Slots List Top 20 Casinos For Us Players Top American Casinos Casinos Accepting Us Deposits New Bonus Slots Online Best Blackjack Bonus All No Download Slots Internet Casino Gambling Online Online Gambling Blackjack Mac Ewallet Express Instant Play Online Casino Online 5 Reel Bonus Slots Best Casino Downloads Casino Bonus 2010 Best Payout Slot Machines Us No Download Casino Online Casino Accepting Us Credit Card Deposits Best Flash Online Casinos Casino Instant Play Top Online Craps Casinos Slots Bonus Usa Accepted Deposit Amex Casino Online For Mac With Instant Play 2010 Best Online Casinos Video Slots No Download Blackjack United States Best Online Craps Casino Usa Online Casino Bonuses Online Flash Usa Casinos Casino Download New Bonus Codes For Casinos Gambling Site In Us 3 Reel Slots No Download Casinos That Play For Real Money Mac Casinos Casino Online Us Player Accepted Casinos For Usa Players Internet Casino Card Games Casino Usa Legal America Casino Bonus Online Casinos With Slots Tournaments For Usa Players Bonus Slot Machines Roulette Casino Games Web Casinos Accept Credit Card Sign Up Bonus Online Casino Best Deposit Casino List Casino Online Games For Mac Best Us Online Casino With Slots Slot Machines With Bonus Games All Online Casinos List Top Casino Bonus For Us Players Best 2010 Casino Games New Casinos Online For Usa Players Internet Casino Rating Igt Online Slots Us Play 5 Reel Slots Online Casinos That Accept Us Mastercard Real Money Online Casinos For Americans Top 10 Rated Casino Games Slots Tournaments Online Top American Online Casinos Play Casino With American Express Any Online Casinos Take Amex Slots Online Blackjack Real Money Us Accepted New Rtg Casino Bonus Instant Play Slot Machine At Casino List Of All Casinos In Us All New Slots Casino Play Usa Ewalletxpress Online Gambling Online Slots Play Now New Online Casino Usa New Online Slot Games Best Payout Casino Slots Video Slot Vegas Casino Video Slots Bonus Bonus Slots For Us Players Deposit Bonus Blackjack Casino Online For Us Player Online Slot Casinos For Us Players Usa Online Credit Card Casino Online Slots Best Odds Craps Online For Us Players Best Pay Out Casinos Usa Rtg Casinos Instadebit Real Casino Video Slots Online 400 Bonus Slots Internet Casino Rankings Online Roulette For Us Players Best Casino Promotion Forum Play Real Casino Video Slots Safe Online Usa Casinos Casinos In The United States Casinos Directory Virtual Casino Blackjack Casino Video Slots On Line Online Craps Blackjack Rtg Casino Coupons 2010 Casino New Bonus Codes Online Casinos Excepting All Us Players Flash Online Casinos Play Online Casino For Mac Casino Bonus Promotion Code Play European Roulette Us Accepted Flash Casinos Online Casino Mac Mac Gambling On Line Newest Slots 2010 Online Us Casinos With Moneybookers Online Gambling For Us Players Online Slots Best Bonuses Casino Sites For American Players Internet Casino Sign Up Bonuses Instant Play Casinos Usa Friendly Best Online Casino Allow Us Amex And Online Casino Casino Games Craps All Casino Bonuses And Codes Us Players Play Casino At Home Real Money Play Craps Online Now Flash Play Casino Usa Welcome Usa Roulette Casino Bonuses The Internet Casino Portal Real Money Slots Bonus Us Casinos With Fast Payouts American Online Casino Games New Online Casino Us Player Best Blackjack In Vegas Casino Usa List Best Slots On The Net Online Casinos For Usa Players Flash Sign Up Bonus Us Players Online Slot For Real Money American Online Usa Casino Slot Payout Online American Casino Games Play Slots Online No Download Required Bonus Slots No Download Play Casino Games For Money In Usa Play Us Casinos Credit Cards Gambling Flash Casino Sites Play Real Money On Wheel Of Fortune Slots Online Gambling Us Ok Internet Deposit Casinos 3 Reel Slots Usa Players Casino Games For Mac In Us Online Usa Slots Easy Online Casino Play Casinos Us Players Bonus Slots Machine Play Slots Online With Bonus Casino Slots Best Odds Play Online Slots For Money Casino Bonus For Roulette All Casinos Online List Real Money Online Craps Best Mac Online Casino On Line Casino Slots Usa Mastercard Online Casinos Casinos Play For Real Cash On Line Casinos Accepting American Express Online Slots That Take Mastercard Best Casino Start Bonus Best Gambling Casinos Us Players Top Casino In America 5 Reel Bonus Slots Best Internet Casino Sites Video Slot Tournaments Best Slots Casinos Online Play Online Slots United States Flash Casino Us Amex Ewallet Xpress Casino Sites Real Video Slots Online Rtg Casino Untied States Play Gamble Online For United States Players Best Online Slots No Downloads Rtg Slots Bonus Online Casino That Accept Us Players Online Casinos United States Can Play American No Download Casino New Casino Slot Machines Casino Games Online That Accept Mastercard Brand New Casinos Online Best Online Flash Casino Bonuses Casino Online Us Blackjack Casino Online Best Mastercard Play Online Casino Who Accept Master Card No Download Casinos For Us Best Promotions For Online Gaming For All Us Players 2010 New Online Casinos Best Moneybookers Casino Online Roulette No Download Bonus Casino For Mac Instant Play Online Casino Games Lastest Rtg Casino Coupon Codes Roulette Slot Machine Online Slot Tournaments Usa Players 3 Reel Slot Machine Downloads Rtg Casinos For Usa Players 99 Slot Machine Signup Bonus Best Bonus Casinos For Us Players Blackjack Gamble Real Money Internet Casino Video Poker Real Vegas Flash Casino Play Slots No Download Real Money Usa Casino Sites Online Slots No Download Brand New Casino Us Players Casino Game No Downloads 2010 Newest Online Casinos Casino Usa Real Money 2010 New Casinos Online Moneybookers At Casinos Online Casinos That Accept Mastercard Deposits Casinos Rtg New Codes Online Casinos That Accept Mastercard American Online Flash Casinos Usa Casinos That Take Mastercard Us Real Money Casinos Casino Usa Slots Gamble Online Real Money Play Casino For Real Money Codes For Rtg Casinos Internet Casino Keno Best Rated Casinos Online Casino Us Amex Best Internet Casino Sign Up Bonus Online Slots Casino Slot Machine List Online Usa Sign Up Bonus Casino No Download Mac Slots Games Best Usa Casino High Roller Casino Gamblers Play Online Craps For Money Usa Best Online Casino Casino Play Real Money Gamble Online Websites Casino Welcome Bonus Money Newest Casino Bonus Codes Online Slots Usa No Download Amex Casino Accept American Express At Online Casinos Rtg Casinos Using Ewallet Express Online Slots Usa Players Best Slots Deposit Bonus Online Blackjack Real Money Us Accepted Blackjack Gambling For Mac Gamble Online Australia Best Online Casinos Usa American Casino Slot Machine Top Pay Online Casino United States Slots Usa Accepted Craps Online Video Games Internet Casinos Directory Vegas Casino Payouts Instant Online Blackjack Online Casino Mac Roulette Casinos In America On Line Gamble Online For Cash No Download Casinos Online Usa Brand New Online Casinos 2010 Internet Casino Guide List Of All Us Legal Online Casinos Online Casino That Accept Us Players With Bonus No Download Slot Machines Online Casino Blackjack Mac Bingo Sign Up Bonus Online Slot Machine Real Money American Express Casinos Casino Online For All Us Players New Casino Bonus Code Top 10 Online Casino Internet Casino Site Reviews Casino Listing Play Real Money Slots With Bonus Casino Games For Mac Best Online Casino Payouts Mac Online Casino Roulette Online Slot Play Money Best Online Us Casino Legal Online Usa Casinos Top 50 Online Casino Casino Slots Bonus Usa Brand New Casino Slots Game No Download Blackjack Real Money Playing Slot Machines At Casino Latest Rtg Casino Codes Play Slots Online Usa No Download Slots With Bonus Echeck Casinos Play No Download Instant Casinos Craps Online Mac Best Internet Casino Sites Credit Cards Accepted At Casino Slots With Bonus Download Instant Signup Bonus Casino Roulette Sign Up Bonus Play Online Casino In The United States Roulette Deposit Bonus Casinos Online Using Amex Top Casino 2010 Top 10 Casinos Best Slot Machine Bonus Rtg Casinos Deposit Bonus Instant Play Casino For Us Players Complete List Of Rtg Casinos Mac Casino Online Top Paying Casino Games Instant Play Rtg Casino Casino Bonuses Blackjack Play For Real Money Casinos New Slots Games For Mac Casino Bonus Game Slots Online Gambling Websites For Usa Real Casino Download Rtg Casino Bonus List Slot Casino For Us Players Online Casino Mac Us Player New Internet Casinos Instant Casino Bonuses All Flash Casinos No Download Ewallet Express Slot Tournaments Best Online Slots Usa No Download Casinos For Us Players Online Casino That Allows Us Players Casino New Bonus United States Online Casinos With No Download Welcome Bonus Casino Rtg Casinos That Accept Visa Top Usa Casino Bonus Online Casino Us Players Slots Online Slots Us Players 2010 Online Casino Codes Onlin Casinos For Real Money Best Odds Online Casinos Casino Online Real Money Casinos For Us Players Instant Casino Bonus Codes List Of Slot Machine Names Online Casino That Accepts Ewalletxpress Play Casino Style Video Slots Online Real Money Online Casino No Downloads Bonus Slots Play Online Casinos In Usa For Real Money Gamble For Money In Online Casinos Las Vegas Casino Usa Online Internet Casino Sites Flash Casino For Usa United States Casino Payouts All Us Players Online Casinos Bonus Codes Casino Video Poker

12 Clever Tips for Securing Your WordPress Site

WordPress Security Tips (masthead)

I’ll be the first to admit that security is far from a fun issue to deal with. If it wasn’t for this cool masthead I whipped up for the occasion, I probably wouldn’t even be excited to talk about it!

But in all seriousness, without taking these precautions you will, eventually, suffer the consequences. It happens to big sites hoping to profit and smaller personal weekend blogs. No one is safe. The most you can do, and the smartest you can be, is to follow the steps I’ve outlined below. With any luck you’ll avoid any WordPress security issues in the future.

First: un-cross your fingers. That won’t help you at all. Okay, now proceed.

Don’t be dumb: cover the basics

Your primary protection against the most common WordPress insecurities is to stay smart and on your game.

Tip 1: Update your version of WordPress

And here comes what is probably the least clever tip on this list: keep an up to date version of WordPress. The team responsible for keeping all of our sites safe is pretty quick to take care of any immediate security concerns, so as long as you keep an eye on the WordPress.org development blog (or alternatively the automatic updater in the most recent version of WP) you should be set to go.

Tip 2: Keep your Plugins up to date

“…Remove any inactive, unnecessary themes and Plugins. The less mess to keep track of the more likely you are to take care of it.”

The second potential security loophole most likely to claim you as its victim is an insecure or out of date Plugin (or theme, technically). More likely it’s a Plugin that needs updated, but themes can sometimes carry along with them assets which will require updating time to time. The easiest way to stay safe is just to update Plugins when WordPress prompts you. If you follow me on Twitter, I’m sure to sound the alarm any time a Plugin shows signs of being vulnerable.

It also wouldn’t hurt you to remove any inactive, unnecessary themes and Plugins. The less mess to keep track of the more likely you are to take care of it.

Tip 3: Maintain recent backups

While it won’t necessarily help you to prevent yourself being compromised, it’s still good thinking to keep steady backups of your database and your wp-content folder. If you run into a situation where your site is compromised, however it happens, having a backup on hand will greatly speed up your recovery time. Which would you rather lose: a couple of comments by reverting back to the weekend’s backup, or 5 hours removing spam content from the end of each of your posts and pages?

For convenient WordPress database backup, check out WP-DB-Backup, a Plugin that makes it painless. Just remember to look after your wp-content folder as well!

Don’t show the house your cards

Certain things won’t necessarily jeopardize you on their own, but letting them hang out won’t help you either.

Tip 4: Hide your directories

Take the effort to hide your directories so that they can’t be viewed by anybody that’s curious. As of WordPress 2.8 (if not 2.7?) we now have an index.php file in each directory that we’d otherwise be concerned about someone malicious viewing in a browser. We’re talking about the Plugins folder, for instance. Without a blank index file to prevent the folder contents from showing, anyone could see the Plugins you have, which would only make it that much easier for them to exploit any of your site’s weaknesses.

Keep in mind that if you have an older version of WordPress running (assuming you can’t upgrade, for some reason) then be sure that you have an empty index.html file in your Plugins directory. Be safe.

Tip 5: Hide login page error feedback

Something else the general public shouldn’t be able to see is the error feedback on your login page. Remove your error feedback to stop anyone from whittling away at potential logins.

See, normally when you try to login and mess something up, WordPress dishes out a helpful sentence or two either explaining that your username or your password is incorrect. While this is helpful for you and your site’s members, it’s also helpful for anyone trying to do bad things to your site.

Luckily it’s just a simple addition to your theme’s functions.php file in order to get rid of this info:

add_filter('login_errors',create_function('$a', "return null;"));
Tip 6: Hide your version number

The third thing nosy do-badders will poke around your site looking for is your WordPress version number. Depending on your theme, this information may be printed into your footer.php file, proudly displayed for all to see.

In most cases, though, it will be inserted automatically by WordPress into your header via the wp_head(). When it’s working, it will print this at the top of your page’s source:

<meta name="generator" content="WordPress 2.8" />

That’s showing a little more skin than we want. But how do we kill it? After all, we need the wp_head() around for just about any Plugin we might use. Just like the above tip, this one can be remedied with a single line in your functions.php file also:

remove_action('wp_head','wp_generator');

Presto change-o, no more version number.

Don’t be like everyone else

One thing that hackers have on just about every WordPress site out there is that they know there are a certain number of givens, some default settings that every user starts with. Your best bet is to change these defaults to things that only you know.

Tip 7: Delete the admin user

The first thing you should do is replace the default username of “admin” with something less obvious. Use a variation on your name, same as you would with any users you would add to your site.

There’s a best way to do this. First, create your new username and all of the info attached to it. Make sure the new username is an administrator on your site. Then log out and log back in under your new account. Delete the admin username, and attribute all of admin’s posts/pages to your new user account.

Tip 8: Create a secure password

I’m not security guru or anything, but if I had to guess more people get burned for having completely guessable passwords than for any other reason. The simplest test: if you can look up your password in a dictionary, it’s a bad password.

My test: if you know your password, it’s a bad password. Pick up a nifty app like 1Password, which is what I use, and protect your password. While you’re at it, do the same thing for everything you log in to. You’ll be amazed how much you can do with all of the space in your head you used up storing passwords before.

Not really, but that sounds pretty enticing doesn’t it?

Tip 9: Change the database prefix from wp_

WordPress stores your site’s content in a number of tables within your database, and each is named with a prefix to group them together. When you are setting up your wp-config.php file, you will have the option, toward the bottom of the file, to change the database prefix. Pick something short, nothing nuts, but something other than wp_.

This is just adding another layer of obscurity between your site and those trying to get in. Why let them count on your tables being named a certain way if you don’t have to?

Go the extra mile, crazy

So far at least a few of these tips should be things that you have either done, or thought about doing in the past. Here are a few of the techniques that only the most secure WordPress sites will worry about. Odds are not many of us are taking advantage of one of these last three tips, let alone all three. Any takers?

Tip 10: Limit login attempts

But let’s assume they (yeah, they — scared yet?) get lucky and try to login with your actual username. What’s to stop them?

We talked about hiding the error printouts on the login page, and about changing the default username from “admin” to something else. But let’s assume they (yeah, they — scared yet?) get lucky and start trying to login with one of your actual usernames. What’s to stop them from using a brute force attack for as long as it takes to guess the right password?

Well, there is one simple way. Grab the aptly titled Limit Login Attempts from the WordPress Plugins directory and activate it on your site (2.7+). Then you’ll be able to set how many chances a user will have to attempt to login for a specified amount of time.

Tip 11: Use SFTP instead of FTP

This one should seem obvious, but it’s always the little things like a stray “S” which throw us off. Are you using a plain old standard FTP connection when you should be using a secure FTP connection? Shame shame.

Avoid anyone listening in to your site activity by securing that connection. Any program you’re using to connect will have that option. Use it. There’s a good sport.

Tip 12: Move the wp-config.php file

Did you even know you could move the wp-config.php file? No? That’s okay, I wasn’t aware until doing research for this tutorial either.

Apparently a recent WordPress update allows us to move our config files for an added level of security. You can freely move the wp-config.php file up one level higher than the rest of your WordPress installation. See the mention regarding this in the Codex.

For anyone interested in doing more heavy lifting with their config files, see WordPress Configuration Tricks as well.

Time to hug and share

Odds are someone here has a story or two regarding WordPress security. It’s one of those things that never seems to come to our minds until we get burned by it, at some point. Anyone here burned?

Or, an even better question: how many of these tips can you proudly say you are already following?

Or, what tips did I leave out? I showed you my cleverness, now you show me yours.


Did you enjoy this post? Then it might be worth your time to subscribe via RSS using your Feedreader or, if you prefer, via email.

About the Author: Ryan Imel

My name is Ryan Imel, and I’m a full time freelance web developer. I work a lot with WordPress, but am comfortable with other systems too.

15 comments so far

  1. Brad said:

    Excellent post Ryan! I might link to this for my presentation at WordCamp Montreal on WordPress Security if you don’t mind. It’s a great resource for WP Security!

    • Ryan Imel said:

      You’re very free to link to, Brad. Glad you liked it.

      Anything I missed?

  2. JLeuze said:

    You covered a lot of important measures here Ryan, I know I need to be more vigilant in securing my WordPress installs!

    There are some other good tips in the “Hardening WordPress” article in the Codex. I try to at least recommended File Permissions so that so that I am not leaving things too open.

  3. Great post. WP Security Scan http://semperfiwebdesign.com/custom-applications/wp-security-scan/ does half of these for you.

  4. Hi Ryan,

    Nice post. I personally password protect the wp-admin folder, using the Password Protection function in CPanel (although the AskApache Password Protect plugin essentially does the same thing).

  5. Aneslin said:

    Excellent tips bro.
    gonna try that wp suffix changes :)

  6. peter said:

    Hi, thx for hte articel,
    I think some word about the email function of wordpress would be helpful.

    bye

  7. Ralph said:

    Great post. I was just recently threatened by some asshat to be hacked, so, perfect timing. Lol.

  8. Mark McLaren said:

    Thanks for the details, Ryan. There are a few here that I was wondering about. These are all simple techniques and, in combination, I’m sure they are very effective.

    I have been using Tip #9 for a long time, but I notice now that most web hosts – BlueHost, for example – don’t make this an option when you use their quick installation script. They create the database and the wp-config.php file for you.

    Once a database has been created, do you know if there is a way to change the prefix? If not, I might ask them to make that an advanced option when using the quick installer.

  9. WP Security Scan lets you change your tables prefix: http://wordpress.org/extend/plugins/wp-security-scan/

  10. Karen said:

    Didn’t understand Tip #4. I generally name my home page index.php or index.html. The tip mentions having a blank index.php or .html file??? Can anyone explain this one? :) Thanks!

Add to this discussion

Required: We need to know who you are.

Required: Your email will not be published. This will also give your comment a gravatar. (What is a gravatar?)

Optional: This will make your name clickable.

Required: Kind of the point of this whole form, don’t you think?

Trackbacks/Pingbacks

  1. [...] here to see the original: Theme Playground | 12 Clever Tips for Securing Your WordPress Site Tags: security Comments0 Leave a Reply Click here to cancel [...]

  2. [...] 12 Clever Tips for Securing Your WordPress Site- Apparently a recent WordPress update allows us to move our config files for an added level of security. You can freely move the wp-config.php file up one level higher than the rest of your WordPress installation. … [...]

  3. [...] function that we created returns only null, the message displayed will be a blank string.SourceTips for Securing WordPressWordPress Security: Hide Log-In Error Messages2. Force SSL UsageThe problem If you worry about your [...]

  4. [...] Tips for Securing WordPress [...]