Apps Ballance Cash_2 Chat Checkout Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Like_1_ Link Lock Log_Out Map Marketing Mobile_UI Navigation POS Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

Preventing access to whole site unless a user is logged in

Iain Poulson avatar
Iain Poulson Last updated on February 24, 2022

With WP User Manager v2.8 it is possible to completely lock a site down to prevent access to pages unless a user is logged in.

This setting can be enabled via Users > Settings > General > Login Settings. You will need to enable the ‘Prevent site access to visitors’ setting:

When this setting is enabled, any visitor to the site who is not logged in will be redirected to the login page (defined in Users > Settings > General). This means they can’t view any of the site until they are logged in.

You can still allow access to the registration page with the ‘Allow site registration’. This will allow access to the page set as the ‘Registration Page’ in Users > Settings > General. If you have multiple registration pages using the
Registration Forms addon, then you can add those URLs to the allowed list with the ‘wpum_registration_pages’ filter, eg.

WP User Manager logo

Get Started with the Best WordPress Membership Plugin Today

Connect, Manage and Build your Membership Site

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket