Restricted Site Access

Restrict access to registered users and specific IP addresses. Control restriction behavior.

Limit access your site to visitors who are logged in or accessing the site from a set of specified IP addresses. Send restricted visitors to the log in page, redirect them, or display a message or page. A great solution for Extranets, publicly hosted Intranets, or parallel development / staging sites.

Adds a number of new configuration options to the Reading (WordPress 3.5+) or Privacy (WordPress pre-3.5) settings panel. From this panel you can:

  1. Enable or disable site restriction
  2. Change the restriction behavior: send to login, redirect, display a message, display a page
  3. Add IP addresses to an unrestricted list, including ranges
  4. Quickly add your current IP to the unrestricted list
  5. Customize the redirect location, including an option to send them to the same requested path and set the HTTP status code for SEO friendliness
  6. Define a simple message to show restricted visitors, or select a page to show them – great for “coming soon” teasers!

restricted-site-access screenshot 1

restricted-site-access screenshot 2

restricted-site-access screenshot 3

  • Rating
  • Requires 3.4+
  • Downloads 69781
  • Updated 2013-01-27
  1. we have tried this plugin. It would do exactly what we want, ie restrict access to logged in users only except for from a specific IP address. Unfortunately, there seems to be a bug with the current version of WordPress + iOS apps which means that users cannot add the site to the mobile app. The app returns a ‘Sorry, can’t log in, Blog returned invalid data’ error

    • I’ll investigate for the next update.

  2. Any plans to make this plugin multisite compatible? Currently, when network-activated, it restricts access to the main blog, but not to any sub-blogs.

  3. Hello Jake, thanks for this plugin, it has saved me time and hassle.

    I have had one issue in that I am also using Donncha’s sitewide tags plugin which checks to see if a blog’s status has been set to allow indexing of the site or not by search engines. As far as I can see indexable == 1 not indexable == 0 and restricted site access == 2. This prevents the sitewide tags plugin from copying posts from blogs which are using restricted site access.

    I am using this for a company intranet and needed to get it working quickly and so have altered line 352 of sitewide-tags.php from
    [code]
    if ( $blog_status != 1 && ( $blog_status != 0 || get_sitewide_tags_option( 'tags_blog_public') == 1 || get_sitewide_tags_option( 'tags_blog_pub_check') == 0) )
    return;
    [/code]
    to
    [code]
    if ( $blog_status != 1 && (get_sitewide_tags_option( 'tags_blog_public') == 1 || get_sitewide_tags_option( 'tags_blog_pub_check') == 0) )
    return;
    [/code]
    And it seems to work. I am no wp plugin expert and so am not sure whether the sitewide tags plugin or restricted site access plugin is doing the wrong thing, but as it stands I do know that my hack will break everything when someone upgrades the swt plugin.
    Which plugin needs to play nicely? :)
    Thanks.

  4. The plugin does not work anymore with the Headway 3.1.2 template. It breaks the visual editor. Is there a way to fix this? It was working with 3.1.1.

    • Are you sure it’s this plug-in? Not sure what would have changed that would have any effect on that.

  5. nice plugin but plz add something where we can only restrict 1 php template or page… then entire website plz

    • That’s not really what I want this plug-in to be. It’s not an all purpose access control plug-in; it’s intended to block sites in (almost) their totality.

      However, it is “hook-able” for developers, and it’s behavior can fairly easily be modified using those hooks to change the logic for what it blocks / allows.

  6. Hi Jake, very nice plugin! I’m trying to set up a local classified website and would like to give access only to the local residents. I can find out witch IP ranges are used for my country, but how do i insert them in the right way? For example:

    31.22.88.0 – 31.22.95.255
    31.148.182.0 – 31.148.183.255
    31.153.0.0 – 31.153.175.255
    31.153.208.0 – 31.153.255.255
    31.201.1.144 – 31.201.1.147
    ….. – …..

    and so on. Is there a way to do that?

    • IP ranges are only supported using subnets, at this time.

  7. Hi,

    is there currently a problem with the Restricted Site Access plugin? My host isolated that there was a problem with it, and my site is working now that it has been deactivated. But I love the plugin and need it or something equivalent.

    • Can you elaborate on the reported problem?

  8. Will definitely use this on my new social network – it’s still in the beta phase. Thanks for this one

  9. Is it possible to restrict rss feed only to say my twitter account or Facebook account?

  10. Hi Jake, nice plug-in.

    I need to redirect the visitor to /specific/folder in my host after logon. How can I do that? Thanks buddy.

    E. Skywalker

    • Not what this plugin does, though if you’re a developer, you can use the hooks.

  11. I’ve customized my login page using the “A5 Custom Login Page” plugin.
    http://wordpress.org/extend/plugins/custom-login-page/

    However, when I installed “Restricted Access” in shows the wordpress default login page & not my customized on.

    It does this whether I choose “Send them to the WordPress login screen” or “Redirect them to a specified web address” were I enter the (mydomain.com/wp-login.php) which is my customized login page.

    I’ve already deactivated the A5 plugin & reactivated it, but I still get the same result. Can you help me with this?

    Thanks

  12. For some reason I can’t add an IP address to the unrestricted list. It just ‘shakes’ to indicate it hasn’t worked. I have tried deactivating various plug ins to see if there is a conflict but to no affect.

    • What IP address did you enter? Are you sure it’s a valid address?

      • yes it is a valid IP address. I also tried clicking the ‘add my current IP address’ button. Same shaking and no luck

  13. I love this plugin! Thank you so much for making it available. I love the simplicity, accomplishing a specific task without trying to be everything.

    I ran into a conflict today though. When this plugin is enabled, I have a conflict with the NextGen Gallery plugin. Essentially, when writing a post, if I use the NextGen Gallery button on TinyMCE, the drop down list does not populate with availabe Galleries, Albums or Pictures. When I click the drop down, I just get the activity circle as if it is trying to populate, but it never does. Then, if I disable Restricted Site Access, the NextGen Gallery addon works fine from TinyMCE when writing a post or page. Any ideas what the problem could be? Thanks!

  14. First of all I adore this plugin it is amazing, so thank you Autors!

    Whenever I install it on ipage.com I get this error. It never happens when I install it on other hostings except for ipage.

    Do you have any idea why this is happening?

    Thank you!

    (happens on all versions)

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    • Nope – but it sounds like your host may have some idea, but is simply concealing the true error message behind that generic error message.

  15. Is there any way to bulk insert the IPs? My client want to ONLY allow from certain countries.
    Thanks

    • You can add IP ranges using subnet ranges (e.g. x.x.x.x/24). You can also override the restriction logic using the built in filters (so you could paste in a bulk of ranges into your functions.php, for instance). There’s no import routine for bulk entry.

  16. This seems to be what I am looking for, except after a member is logged in instead of being redirected to the page they originally wanted, it takes them to the web site home page. Ie Instead of members.mastergardenerssandiego.org it goes to mastergardenerssandiego/index.php. It works correctly in Safari, but not Opera or my iphone. Thanks

    • Never mind. Now it works correctly. Not sure why though.

  17. Is there a way to override the blocking of the website on the registration page I have created?
    I want users to be able to see this page, create accounts and see content.

  18. Excellent work; very user-friendly but still configuratively robust. It’s better supported and more current than the existing plugin alternatives. Also, regarding the 10up website itself, well done on a pretty responsive design.

  19. hello
    Your plugin seems to be what I am looking for, BUT:
    I would like to have few pages accessible as teaser or to contact me.
    With the current option, it’s a general redirect to only one page.
    Or in other words: each page should have the option to restrict or not.

    Cheers
    Reto Leimgruber

    • Right, this plug-in isn’t meant to be a selective public / private tool, just a global blocking solution. HOWEVER, there is a filter that lets you catch and override the restriction based on any criteria (like the current page ID).

  20. Hello,

    Can you explain how to define IP Range for the IPs below .

    133.64.*.*
    133.65.*.*
    129.139.226.*
    129.139.0-31.*

    in the Unrestricted IP addresses.

    CMS: WordPress with S2Members

    Thanks
    Daniel

    • We don’t support wild cards – you have to use subnet ranges.

Leave a Comment

We make web publishing easy. Maybe even fun.

hire us apply