跳至内容
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 新闻
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress
WordPress.org

Plugin Directory

TR Register Only

  • 提交插件
  • 我的收藏
  • 登录
  • 提交插件
  • 我的收藏
  • 登录

TR Register Only

作者:techieresource
下载
  • 详情
  • 评价
  • 安装
  • 开发进展
支持

描述

TR Register Only makes your entire WordPress site private. Once enabled, only logged-in users can access any page, post, or custom post type. Everyone else is redirected to the login page (or a custom URL of your choice).

Key Features:

  • ✅ One-click enable/disable toggle
  • 🔒 Role-based access control — set minimum required user role
  • ↩️ Redirect to WordPress login page or any custom URL
  • 💬 Custom message shown on the login page
  • 📋 Whitelist specific pages for public access (e.g. pricing, landing pages)
  • 🏠 Optionally whitelist the home/front page
  • 📡 Optionally restrict REST API to authenticated users
  • 🧹 Clean uninstall — removes all data when deleted

Perfect for:

  • Private/members-only communities
  • Staging and development sites
  • Corporate intranets
  • Schools and educational platforms
  • Subscription-based content sites

安装

  1. Upload the tr-register-only folder to /wp-content/plugins/
  2. Activate the plugin from Plugins > Installed Plugins
  3. Go to Settings > TR Register Only to configure

常见问题

Will this lock me out of the admin?

No. The WordPress login page (wp-login.php) is always whitelisted automatically, so you can always log in.

Can I allow some pages to be publicly accessible?

Yes. In Settings, enter the page IDs you want to keep public under “Whitelisted Page IDs”. Separate multiple IDs with commas.

Does this protect the REST API too?

Optionally. Enable “Protect REST API” in settings to require authentication on all REST endpoints. Note this may break plugins that rely on unauthenticated API calls.

How do I find a page’s ID?

Go to Pages > All Pages, hover over a page, and the ID appears in the URL at the bottom of the browser (e.g. post=42).

评价

此插件暂无评价。

贡献者及开发者

「TR Register Only」是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • techieresource

帮助将「TR Register Only」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

2.0.0

  • Complete rewrite for modern WordPress 6.x compatibility
  • Added role-based access control (minimum role setting)
  • Added custom URL redirect option
  • Added page whitelist feature
  • Added home page whitelist option
  • Added REST API protection option
  • Added custom login message support
  • Added clean uninstall (removes options on delete)
  • PHP 8.x compatible
  • Singleton pattern with proper OOP architecture
  • Full input sanitization and escaping

1.0

  • Initial release

额外信息

  • 版本 2.0.0
  • 最后更新:1 月前
  • 活跃安装数量 30+
  • WordPress 版本 5.6 或更高版本
  • 已测试的最高版本为 6.7.5
  • PHP 版本 7.4 或更高版本
  • 语言
    English (US)
  • 标签
    loginmembers-onlyprivateregistrationrestrict
  • 高级视图

评级

5 星(最高 5 星)。
  • 3 条 5 星评价 5 星 3
  • 0 条 4 星评价 4 星 0
  • 0 条 3 星评价 3 星 0
  • 0 条 2 星评价 2 星 0
  • 0 条 1 星评价 1 星 0

添加我的评价

查看全部评论

贡献者

  • techieresource

支持

有话要说吗?是否需要帮助?

查看支持论坛

  • 关于
  • 新闻
  • 主机
  • 隐私
  • 陈列窗
  • 主题
  • 插件
  • 区块样板
  • 学习
  • 支持
  • 开发者
  • WordPress.tv ↗︎
  • 参与
  • 活动
  • 捐赠 ↗
  • 未来五分计划
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

China 简体中文

  • 关注我们的 X(原 Twitter)账号
  • 访问我们的 Bluesky 账号
  • 关注我们的 Mastodon 账号
  • 访问我们的 Threads 账号
  • 访问我们的 Facebook 公共主页
  • 关注我们的 Instagram 账号
  • 关注我们的 LinkedIn 主页
  • 访问我们的 TikTok 账号
  • 访问我们的 YouTube 频道
  • 访问我们的 Tumblr 账号
代码如诗
The WordPress® trademark is the intellectual property of the WordPress Foundation.