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 settings panel as well as the Network Settings panel in multisite. From these panels you can:

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

Screenshot of settings panel with simple Restricted Site Access option (send to login page).

Screenshot of settings panel with restriction message option enabled

Plenty of inline help! Looks and behaves like native WordPress help.

  • Rating
  • Requires 6.4+
  • Downloads 900,350
  • Updated 2024-11-12
  1. 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.

  2. 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

    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;
    

    to

     
    if ( $blog_status != 1 && (get_sitewide_tags_option( 'tags_blog_public') == 1 || get_sitewide_tags_option( 'tags_blog_pub_check') == 0) )
    		return;
    

    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.

  3. 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.

  4. 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.

  5. 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.

  6. 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?

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

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

  9. 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.

  10. 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

  11. 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

        • I have the same problem. It worked once with one single ip, but I need subnets (and tried 158.37.88.0/21) but now it won’t work either with single ip or subnets.

          If you could help, it would be much appreciated.

  12. 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!

  13. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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.

  18. 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).

  19. 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.

  20. How do I re-direct users to a specified URL after they log in?

    Thanks!
    Joe

    • You find a different plug-in that does that. :-)

Leave a Comment

Finely crafted websites & tools that make the web better.