Is Your Blog Really Secure?

by Alastair McDermott · 1 comment

Inspired by recent comments, I’ve decided to make today’s tip about hardening your WordPress install. You should keep your blog secure so that nobody can deface it (which happened recently to some high profile bloggers).

There are several ways you should secure your install, to be safest you should apply all of these different methods.

The first you should do, right now, is login to your Dashboard and check the number at the very bottom of the page – it should look something like “2.x — 0.20 seconds”. Now check and see what the latest release is on the WP download page here – if you’re lagging behind you should update immediately.

You should also protect your WordPress files – the wp-admin, wp-content and wp-includes files.

To start, create a file in your wp-content and wp-includes directories called .htaccess, and put this into the file:


Order Allow,Deny
Deny from all
<Files ~ ".(css|gif|jpe?g|js|png)$">
Allow from all
</Files>

This restricts all files accept images, CSS and JavaScript – put this .htaccess file into both your wp-content and wp-includes directories. Important note: this will limit use of the WordPress Visual Editor so if you like to use that you may want to only add this in the wp-content directory, and not the wp-includes one.

You can also restrict access to your wp-admin directory by IP address, which is what I use. Here’s the contents of the .htaccess file for the wp-admin directory if you want to use this approach:


order deny,allow
allow from 0.403.256.299 # put your actual static IP address
deny from all

The advantage of these changes is that they should not stop your plugins from working. If you find problems with your plugins (or even with this site) then please leave a note below.

Share this post
  • Add to Delicious
  • Add to Digg
  • Add to Reddit
  • Add to StumbleUpon
  • Add to Technorati
  • Add to Sphinn
  • Add to Google Bookmarks

{ 1 comment… read it below or add one }

Pat September 6, 2007 at 5:05 pm

Thanks, I was not aware of this!

Leave a Comment

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

Previous post:

Next post:

skype://Website.Doctor

About

WebsiteDoctor is consultancy and training business focused on internet marketing, particularly search engine optimisation. We are experts in all aspects of online marketing and websites. We can help your businesses increase sales and profitablity by reaching more customers through internet marketing. We can help you save money through increased knowledge of online technologies. Are you looking to upskill and become more valuable on the job marketplace? Sign up for one of our online marketing training courses like search engine optimisation or social media marketing!

Our RSS Feeds

We value your privacy.