Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Wie man den Zugriff auf WordPress-Seiten nach IP oder angemeldeten Benutzern einschränkt

Hinweis der Redaktion: Wir erhalten eine Provision für Partnerlinks auf WPBeginner. Die Provisionen haben keinen Einfluss auf die Meinung oder Bewertung unserer Redakteure. Erfahre mehr über Redaktioneller Prozess.

Sie sind dabei, ein neues Produkt auf den Markt zu bringen und haben dafür eine großartige Website mit der weltweit beliebtesten Web-Publishing-Plattform, WordPress, entwickelt. Sie möchten die Website mit einer eigenen Domain und eigenem Hosting testen, sind aber noch nicht bereit, sie zu veröffentlichen. In einem anderen Artikel haben wir bereits darüber gesprochen, wie man WordPress ohne Benutzerregistrierung mit einem Passwort schützen kann. Wie wäre es, wenn Sie den Zugang zu einer Website auf Besucher beschränken, die eingeloggt sind oder über eine IP-Adresse verfügen? In diesem Artikel zeigen wir Ihnen, wie Sie den Zugriff auf eine WordPress-Site nach IP-Adresse oder eingeloggten Benutzern beschränken können.

Video-Anleitung

Subscribe to WPBeginner

Wenn Ihnen das Video nicht gefällt oder Sie weitere Anweisungen benötigen, lesen Sie bitte weiter.

Als erstes müssen Sie das Plugin “ Restricted Site Access “ installieren und aktivieren. Nachdem Sie das Plugin aktiviert haben, gehen Sie zu Einstellungen “ Lesen. Scrollen Sie nach unten, um die Optionen zur Konfiguration des eingeschränkten Zugriffs zu sehen.

Restricting access to a site for logged in users or specific IP address

Mit dem Plugin „Restricted Site Access“ können Sie den Zugriff auf eine WordPress-Website nur für angemeldete Benutzer oder für Personen mit bestimmten IP-Adressen beschränken. Sie können auch festlegen, dass Benutzer, die keinen Zugriff auf die Website haben, auf die Anmeldeseite weitergeleitet werden, auf eine andere Webadresse umgeleitet werden, ihnen eine benutzerdefinierte Nachricht angezeigt wird oder sie sogar auf eine bestimmte Seite (Coming Soon-Seite) umgeleitet werden, die Sie auf derselben Website erstellt haben. Die Funktion „Nach IP einschränken“ ist sehr nützlich, wenn Sie mehreren Mitarbeitern im Büro den Zugriff auf das Entwicklungsprojekt ermöglichen wollen, ohne dass sie sich als Benutzer registrieren müssen.

Dieses Plugin kann für Betatests Ihrer Website vor einer Produkteinführung sehr nützlich sein. Es ist auch gut geeignet, um private Blogs nur für Freunde und Familie zu erstellen. Wir hoffen, dass dieser Artikel Ihnen hilft, Ihre Projekte diskret durchzuführen. Haben Sie andere Möglichkeiten, den Zugriff auf Ihre WordPress-Website zu beschränken? Teilen Sie sie mit uns in den Kommentaren unten.

Offenlegung: Unsere Inhalte werden von unseren Lesern unterstützt. Das bedeutet, dass wir möglicherweise eine Provision verdienen, wenn Sie auf einige unserer Links klicken. Mehr dazu erfahren Sie unter Wie WPBeginner finanziert wird , warum das wichtig ist und wie Sie uns unterstützen können. Hier finden Sie unseren redaktionellen Prozess .

Das ultimative WordPress Toolkit

Erhalte KOSTENLOSEN Zugang zu unserem Toolkit - eine Sammlung von WordPress-bezogenen Produkten und Ressourcen, die jeder Profi haben sollte!

Reader Interactions

25 KommentareEine Antwort hinterlassen

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jeff says

    Can you restrict by IP by role? We want to limit by IP user logins that have full admin rights. Subscribers, Authors, and Editors will not be limited by IP address.

    • WPBeginner Support says

      We do not have a specific recommendation for role-specific limitations at the moment but we will be sure to share if we find a method we would recommend.

      Admin

  3. Terry says

    I think this plugin is great for my wholesale accounts. but the end user (retail) for me is a customer that has to approve designs. I do not understand how to make the private page with password open for them while keeping the wholesale side ip protected. Is there a plugin that allows access by page while restricting by ip address. The password feature for the wholesale side is too vulnerable to being shared.

  4. chris says

    According to the FAQ’s here is a way to make exceptions for specific pages:

    add_filter(‚restricted_site_access_is_restricted‘,’impressum_override‘,10,2);

    function impressum_override( $is_restricted, $wp ) {
    // check query variables to see if this is the feed
    if ( ! empty( $wp->query_vars[‚pagename‘] != ’name-of-page‘ ) ) {
    $is_restricted = false;
    }
    return $is_restricted;
    }

    • Jim Gore says

      I also liked this simple and effective plugin, until I discovered that the lost password page couldn’t be reached. I also tried another nice plugin (restrict site access), also simple to set up & effective, but it suffered the same problem. The author of that plugin suggested that the problem could be resolved by hooking code in to handle that page.

  5. Shoeb says

    Hi,
    How to handle the scenario with the Dynamic IP addresses. If we unrestrict certain IP addresses then every time the IP address will get change. Then what to do in this situation ?

  6. Mariska Van de Langenberg says

    If you would have a subscription sign up for a product as well as a registration as affiliate on your site….would there be an option to avoid people to sign up as affiliate first and then subscribe to the product in order to get commissioned on them? Like a check on IP amongst the affiliate IP’s?

  7. kate says

    I have a problem when my members sign up they are taken to payment page but if they click off this page they can log in without paying. How do i restrict their access until they have paid the fee

    in a nutshell How can i restrict access to my members until they pay

  8. Mona says

    Can you please clarify the following:

    By restricting site access to those who are „logged in“ – does that mean users have to set up a WordPress account? I’m trying to make it as easy as possible for the non-savvy computer user for accessing a family website.

    Also, do restricted access plugins only work on self hosted sites? What about free sites like WordPress.com?

    Thanks!

  9. Ruchi says

    Is there a way to restrict users to only a certain section on the site, where they can access product data etc. based on an email login? I’m an amateur webmaster and have been struggling with this.

      • Ruchi says

        Thanks. I ended up using word press access control since it allowed more customization, been workin like a charm..
        Used a lot of tips from your website though. You guys are doing a great job! Thanks much!

  10. Simon says

    So basically install a plugin… what a very informative article.

    If anyone else is interested you can add code in your functions file to prevent anyone who is not logged in from viewing your site:

    function password_protected() {
    if ( !is_user_logged_in() ) {
    auth_redirect();
    }
    }
    add_action(‚template_redirect‘, ‚password_protected‘);
    add_action(‚do_feed‘, ‚password_protected‘);

    • Editorial Staff says

      Thank you for sharing an alternative code solution, but why reinvent the wheel? There is absolutely nothing wrong with installing a plugin to do a simple task. That’s what plugins are made for. Also the author of that plugin is fairly well-reputed in the community. When we need to restrict site access by IP or logged in users, we use this plugin.

      Admin

    • Barry says

      Hi simon,

      Your code seems so simple yet it doesn’t work for me. I even check by putting a simple echo before the if statement to check if the function is being called at all and it doesn’t.

      So which add_action should i use?

    • Malc says

      Simon, this plugin allows access to a whitelist of IP addresses. Not a common request – but very useful from time to time. Do you have code that could handle that function?

Eine Antwort hinterlassen

Danke, dass du einen Kommentar hinterlassen möchtest. Bitte beachte, dass alle Kommentare nach unseren kommentarpolitik moderiert werden und deine E-Mail-Adresse NICHT veröffentlicht wird. Bitte verwende KEINE Schlüsselwörter im Namensfeld. Lass uns ein persönliches und sinnvolles Gespräch führen.