Linux 软件免费装
Banner图

Real IP Restore for Cloudflare

开发者 websolman
更新时间 2026年6月2日 16:25
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

logging proxy cloudflare cpanel real ip

下载

1.3.1

详情介绍:

On many shared cPanel hosts - Bluehost, HostGator, Namecheap, A2 Hosting, GoDaddy, and European providers such as IONOS, OVHcloud or Krystal - Apache does not natively restore the client IP from Cloudflare headers. This causes WordPress, WooCommerce, security plugins and access logs to record Cloudflare's edge IP instead of the real visitor IP. Real IP Restore for Cloudflare fixes this transparently:
  1. On every request, checks whether REMOTE_ADDR belongs to a Cloudflare IP range.
  2. If yes, replaces REMOTE_ADDR with the value from CF-Connecting-IP (or X-Forwarded-For as fallback).
  3. IP ranges are fetched once per day from Cloudflare's official endpoints and cached as a WordPress transient.
Features:

安装:

  1. Upload the plugin folder to /wp-content/plugins/.
  2. Activate via Plugins → Installed Plugins.
  3. Done. Visitor IPs are now correctly logged.

升级注意事项:

1.3.1 Compatibility with WordPress 7.0 and cleaner translation loading.

常见问题:

Does this work with WooCommerce fraud detection?

Yes. All plugins that read $_SERVER['REMOTE_ADDR'] will receive the real visitor IP.

What if my server already handles real IPs via mod_remoteip?

The plugin checks the IP against Cloudflare ranges before replacing it. If REMOTE_ADDR is not a Cloudflare IP, nothing is changed.

Can I manually refresh the IP range cache?

Yes - Settings → CF Real IP → Refresh IP Ranges Cache.

更新日志:

1.3.1 1.3.0 1.2.0 1.1.0 1.0.0