Daily Tip: .htaccess Lockdown For WordPress Backend

April 14, 2010  | 
6 Comments

Worried about someone hacking your WordPress site? Here’s one way to make it just a little bit more secure. This little snippet restricts access to your /wp-admin/ directory to only the IP address that you specify, which puts your admin dashboard URLs securely in your control.

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Access Control"
AuthType Basic
order deny,allow
deny from all
#IP address to Whitelist
allow from xxx.xxx.xxx.xxx

Replace the x’s with your IP address to institute your lockdown.

Source: Brad Williams on the WordCamp Boston post: Top 5 WordPress Security Tips Done In Under 5 Minutes

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

6 Responses to Daily Tip: .htaccess Lockdown For WordPress Backend

  1. Maybe it’s easier to protect it with a password? Or would that crash the complete sign in page?

  2. It’s just a different approach. If you’re the only one accessing the dashboard and don’t want to let anyone else in, then this snippet is for you. I think a password is more easily hacked than using .htaccess, but it’s really up to you. You can even employ a combination of methods if you want.

  3. Excellent tip, but what IP should I enter ? I’m asking because I think my internet provider constantly changes my ADSL router’s IP…

  4. How often do they change it? I would just enter the one it’s currently using then change it if they do (you’d know if you got locked out). If it changes too often for that to be practical, then this tip might not be for you.

  5. Thanx Sara, I’ll give it a try

  6. Do you refer to the IP address of the host where my WP site lives or the address of where I’ll be coming from to do admin work on the site?

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may 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>

Subscribe without commenting