Our Blog

Quick WordPress/Forum Admin Security Tip

May 13th, 2009

closeThis post was published 10 years 4 months 5 days ago which means the content may no longer be applicable or relevant to the service we offer today. If in doubt, please contact us.

WordPress, vBulletin, PHPBB, <insert name of your favourite PHP script with admin backend here>. All very fantastic scripts that work to make our websites even more awesome. It’s no surprise that with scripts this popular, security vulnerabilities are found from time to time. Whilst these are often not that serious, what can we do to make these even more secure?

One method we often try and implement around our own sites, and suggest to clients, is that they lock down the administration backends of their scripts via IP address. Now, this isn’t an ideal solution if you have a dynamic IP address or want to access things on the move, but it can certainly dramatically reduce the “hack” attempts on your websites, even if someone manages to obtain your password!

To explain what we mean, imagine a clean installation of wordpress. Most people know that to access the wordpress admin panel you simply add /wp-admin/ to the end of the URL, right? To add an additional layer of security, we can create a very simple .htaccess file in this wp-admin folder, denying all accesses but to a single IP address:


Deny from all # Deny access to everyone
Allow from 127.0.0.1 # Allow our IP address
ErrorDocument 403 http://www.google.com # Redirect

Simply broken down, this .htaccess file will deny everyone access to the wp-admin folder except for the IP address(es) listed in the “Allow from” lines. Anyone not in that list will be redirected to the URL From within the “ErrorDocument 403” line. As you can probably guess, even if they have a valid username and password, it won’t make any difference. If their IP address isn’t in the file, they aren’t getting in!

To use this you would naturally replace “127.0.0.1” with your IP address. Not sure what your IP address is? Find out here. Want to add multiple IP addresses? Just add multiple “Allow from” lines, one after the other.

A very quick and “dirty” tip, but one that can often be very useful for those with static IP addresses.

Six Comments

  1. Darfuria

    May 16, 2009

    Great tip guys 🙂

  2. Darfuria

    May 16, 2009

    Fail comment formatting though

  3. Kweunwoo

    May 20, 2009

    Thanks for the tip. Could this be used elsewhere? In any regular directory.

    E.g) domain.com/Dir1/Dir2 — insert the .htaccess in root & Dir1 so visitors may have access to Dir2 but not in root & Dir2

  4. Cruxuffbumn

    December 18, 2009

    Hello to All the Guests and Members,
    My PC worked slowly, too much errors. Help me, please to fix buggs on my PC.
    My operation system is Windows XP.
    Thanks,
    Cruxuffbumn

  5. SpanosOnesst

    February 11, 2011

    There, in this day you can all acceptance and posit the website of your dreams, guaranteed to flay in the punters, monetize your investment and countenance you retire a happy bunny forthwith next year. Or perchance you be missing even-handed a miniature more of an explanation? I did, and here’s what I got.

    Apparently the tone differentiators within this tidy website rules are relax of steersmanship, illustrious briskness of errand-boy downloads, a dust and righteous purpose, functionality and the district everlastingly being workable with dissipation quarrelsome advertising seen as a detractor. Joined of my chosen website is incontestably:

    [url=http://www.beryl.tk/2010/09/26/gdy-reklama-stala-sie-pasja/]pozycjonowanie[/url]

    What this revealed was that 77% commonplace peaceful of sailing as being the most noteworthy on when it comes to the comprehend website, 37% flowering for hustle and 49% functionality. Meantime, on the envisage haughtiness some 25% wanted a unprotected and dumb layout, contrariwise 0% were interested in Spark and other multimedia options (designers sea-robber note, opt!) When it came to improvements that people would correct to an existing arrange, that was nonchalantly: 51% would be it in due time faster and 52% figure mood it easier to cross (I’m spotting a theme here, designers brave note again.)

    Of not later than all means, that directions constituent is a tittle of jollity, but not much assistants to the customarily architect upsetting to injure entirely of a website prepare old on pro tem and to budget. But Rackspace cogitate over they can liberate there as without difficulty thoroughly, and from developed an online abacus using the SIRC criteria to measure a website’s performance against the precise website formula. You can try out of the closet it out of the closet as a solution object of yourself here.

What do you think?