| 开发者 |
lionsher
nathansingh chrisakelley dimensionmedia slaFFik jaredatch smub |
|---|---|
| 更新时间 | 2026年3月5日 10:10 |
| PHP版本: | 7.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-3.0-or-later |
https://example.com/welcome)/wp-login.php will now land on that page instead of the WordPress dashboard. Users who were redirected to the login page from a specific URL will still return to that URL after logging in.
How to Set Up a WordPress Multisite Intranet
For organizations running a WordPress multisite network:
auth_redirect() function for reliable login redirection/wp-json/wp/v2/postsmanage_options (single site) or manage_network_options (multisite) capabilitiesaioi_allow_public_access filter for developers who need to make specific pages or endpoints accessible without authentication.
This filter runs during both the template redirect check and the REST API dispatch check. Return true to allow public access for the current request:
add_filter( 'aioi_allow_public_access', function( $allow ) { // Allow public access to a specific page if ( is_page( 'public-landing' ) ) { return true; } return $allow; } );
This is useful for exposing specific landing pages, webhook endpoints, or custom API routes while keeping the rest of the site private.
Google Workspace Integration
If your organization uses Google Workspace (formerly Google Apps), two companion plugins extend your intranet:
all-in-one-intranet directory and contents to the /wp-content/plugins/ directory, or upload the ZIP file directly in the Plugins section of your WordPress adminInstall and activate the plugin, then go to Settings > All-In-One Intranet and check "Force site to be entirely private." All pages, posts, and custom content types will require login. The REST API and XML-RPC are also locked down automatically.
No. Media files (images, PDFs, videos, etc.) that are uploaded through WordPress remain accessible to anyone who knows the direct URL. This is because WordPress serves media files directly through your web server, bypassing PHP and plugin logic. This limitation is common to most WordPress privacy plugins. If direct media file protection is a requirement, you would need a server-level solution or a dedicated download protection plugin in addition to All-In-One Intranet.
Yes. When the private site option is enabled, all unauthenticated REST API requests receive a 401 error response. This prevents external tools, scripts, or bots from accessing your content through API endpoints like /wp-json/wp/v2/posts. Authenticated requests from logged-in users continue to work normally.
The plugin records a timestamp each time a logged-in user loads a page. On the next page load, it compares the current time against the stored timestamp. If the difference exceeds the configured idle time, the user is logged out immediately. The idle timer resets on every page load, so users who are actively browsing are never interrupted. You can set the timeout in minutes, hours, or days.
Yes. In the Login Redirect section of the plugin settings, enter the full URL of the page you want users to land on after logging in. This overrides the default WordPress behavior of sending users to the dashboard. Note that if a user was trying to reach a specific page before being asked to log in, they will be redirected back to that page instead of the custom redirect URL.
Yes. The plugin is fully compatible with WordPress multisite. In a multisite network, the settings are managed from the Network Admin area. You can make the entire network private, require users to be members of individual sub-sites before accessing them, and automatically assign roles to users across sub-sites when new users or new sites are created.
Yes, but it requires a small amount of code. Use the aioi_allow_public_access filter in your theme's functions.php file or a custom plugin. For example, to keep a page with the slug "public-info" accessible without login:
add_filter( 'aioi_allow_public_access', function( $allow ) { if ( is_page( 'public-landing' ) ) { return true; } return $allow; } );
Yes. When the private site option is enabled, the plugin overrides the robots.txt file to disallow all crawling. It also disables outgoing pingbacks and trackbacks, so your site does not announce new content to external services or ping aggregators.
Generally, yes. Most WordPress caching plugins bypass the cache for logged-in users and do not cache redirects, so the privacy enforcement works as expected. However, aggressive full-page caching at the server level (Varnish, Nginx FastCGI cache) may serve cached pages to unauthenticated users if not configured to respect WordPress login cookies. If you use server-level caching, make sure it bypasses the cache when WordPress login cookies are absent.
On a single-site WordPress installation, users who are logged in but have no assigned role are treated as unauthorized. The plugin logs them out and displays a message explaining that they do not have permission to access the site. This prevents access by accounts that have been deactivated by removing their role rather than deleting them.
Yes. When the private site option is active, the plugin completely disables XML-RPC. This prevents any remote access through the XML-RPC protocol, including third-party apps and services that use it to interact with WordPress.
The plugin uses WordPress's built-in auth_redirect() function to send unauthenticated users to the login page. Most custom login page plugins work by intercepting the standard login URL and redirecting to a custom page. Because All-In-One Intranet relies on standard WordPress authentication functions, it is generally compatible with custom login page plugins. The login redirect feature also works regardless of whether the user logs in through the default or a custom login page.