Linux 软件免费装

PearlView Counter

开发者 prashant32
更新时间 2026年11月28日 01:56
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

下载

1.3.0

详情介绍:

A visit does not update the database. The page prints the current total and, after it has loaded, a tiny request adds one to a Redis counter. A scheduled check later copies those counters into post meta, and only while the clock is inside a window you set. Default windows, India time (Asia/Kolkata): Change the time zone, the hours, and how often the check runs under Settings → PearlView Counter. The total shown at the end of a post is the database value plus anything still waiting in Redis. Requires a persistent object cache. Redis, via the Redis Object Cache plugin, is the expected setup.

安装:

  1. Upload the plugin zip in Plugins → Add New → Upload Plugin, then activate it.
  2. Install and enable Redis Object Cache so wp-content/object-cache.php is active.
  3. Open Settings → PearlView Counter and confirm the hours.
  4. On a VPS, run real cron every 15 minutes so the 3:00 AM window still fires when the site has no visitors:
define( 'DISABLE_WP_CRON', true ); */15 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

常见问题:

Will a page view write to MySQL?

No. The view increments Redis. MySQL is updated only inside your write hours, or when an administrator uses “Write to the database now”.

What if Redis restarts before a window?

Pending counts that have not been written yet are lost. Totals already stored in post meta stay.

Does uninstall delete the counts?

No. Settings are removed. The _pearlview_views post meta is left in place.

更新日志:

1.0.0