Improving Wordpress Security In Five Easy Steps

Whilst Wordpress is a great publishing tool it does have it’s challenges and one of my greatest concerns is always security. The Wordpress team of developers do a good job of releasing regular fixes but as always hackers inevitably find loopholes and exploits in each new version. Left in its default state Wordpress can prove particularly vulnerable so here is a list of simply steps you can make to ensure your Wordpress blog or website is hacker proof.
Step 1: Delete the Wordpress version information that appears in the header template.
This is the first step you should take as it tells hackers who view the source code of your Wordpress site what version your using. If they know the specific version then they may be able to exploit certain loopholes. Simply delete the string that looks like this (see below) in the particular theme folder you have installed.
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<!– leave this for stats please –>
Step 2: Ensure your plugins folder isn’t viewable.
Now this can be achieved in two ways you can simply upload an index file (i.e. index.html) in the plugins folder or make sure that directory browsing is turned off. If your using a web host that supports cPanel then this is straightforward as you can use the Index Manager to turn off indexing for the public_html folder where your web files are uploaded. If a hacker can see the plugins your using then they will be able to exploit potential loopholes in them.
Step 3: Restrict access to your wp-admin folder.
If a hacker knows your using Wordpress then they will be able to guess the login url for the admin area and this will expose your Wordpress login page to a lot of punishment. So its best to restrict access to this folder via IP address. Now if you have a static IP address then great otherwise this maybe tricky as your ISP may change this frequently and you’ll have to manually change your IP each time. To restrict access you can use the .htaccess file with the following code uploaded to the wp-admin folder.
order deny,allow
allow from 127.0.0.1 # Change this to your particular IP address
deny from all
Step 4: Stop wp-admin and wp-includes from being indexed by search engines.
This may seem hard to believe but its happened to me in the past so you’ll want to ensure you have your trusty robots.txt file set-up so that these folders aren’t crawled by search engine spiders or those pretending to be search engines. The code you’ll need looks like this (see below) and in should be uploaded to the root directory.
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Step 5: Keep Wordpress up to date.
This may seem like a no brainer but its easy to lose track of what versions of Wordpress you have installed and on what sites. If you have a web host that supports cPanel then your in luck as upgrading is usually a one click process. If you don’t then you’ll have to upgrade manually. This doesn’t take too long and Wordpress has detailed upgrade instructions however if you have several websites to upgrade then it can be a pain.
Further Recommendations for Wordpress Security
Hardening Wordpress with htaccess
An excellent article that shows you how to beef up security using the .htaccess file.
Visit the Wordpress blog frequently as they will announce any security loopholes and fixes.
Great security tool that lets you scan your Wordpress website for security flaws. Simply download the plugin, upload and activate it and then visit the scanner page. Don’t forget however to deactivate the plugin afterwards as it will leave you open to others scanning your site for the same flaws.
9 Comments
Comments RSS Feed TrackBack URL











February 12th, 2008 at 11:43 am
Looks a bit like a rewrite/ripoff of http://www.mattcutts.com/blog/three-tips-to-protect-your-wordpress-installation/ to me …
February 12th, 2008 at 11:45 am
[…] Improving Wordpress Security In Five Easy Steps has some nice tips to protect your Wordpress install. Although wel written I think I’ve read this somewhere else before. Can’t remember though. I do remember! Spread the word! […]
February 12th, 2008 at 12:07 pm
Hi Bramus, It certainly wasn’t my intention to produce a knock article but to compile a list of what I see as the most important steps to improving Wordpress security. These tips do exist elsewhere but not all in the same place. Thanks for pointing out Matt Cutts article which as usually is of a very high standard and one that I had missed.
February 12th, 2008 at 12:51 pm
Nonetheless it’s a fine article combining them all indeed. Just reminded me of that one by Matt
February 12th, 2008 at 12:58 pm
Cheers Bramus.
February 12th, 2008 at 3:52 pm
Story added…
Your story was featured in Simalish! Here is the link to vote it up and promote it: http://www.simalish.com/TutorialsArticles/Improving_Wordpress_Security_In_Five_Easy_Steps…
February 15th, 2008 at 3:35 am
Improving Wordpress Security In Five Easy Steps…
Whilst Wordpress is a great publishing tool it does have it’s challenges and one of my greatest concerns is always security. The Wordpress team of developers do a good job of releasing regular fixes but as always hackers inevitably find loopholes and…
February 15th, 2008 at 10:00 pm
[…] online today was this helpful article at Web Design Goldmine on securing WordPress. If you’re a fan of WP (as I obviously am) […]
April 15th, 2008 at 7:13 am
Wow! Great security tips! Thanks for this one. I always been a WP user but not really particular on its security side.
-Jan