Set up Pagereckon on CWP (Control Web Panel)
CWP, short for Control Web Panel, writes one access log per domain, and Pagereckon reads that file to count people, bots and AI crawlers. This guide covers the path, read access, rotation and the cron job.
Because CWP is usually a VPS or dedicated server with root access, you can fix most problems yourself in a few minutes.
Where CWP keeps the access log
The CWP wiki lists /usr/local/apache/domlogs as the folder for per domain logs. It also notes that Apache and nginx share the same per domain file there. So even when nginx runs in front of Apache, you only need one file per site.
| Path | What it is |
|---|---|
| `/usr/local/apache/domlogs/example.com.log` | Live access log for the domain |
| `/usr/local/apache/domlogs/example.com.error.log` | Error log, not useful for Pagereckon |
| `/usr/local/apache/logs/` | Main Apache logs for the server |
| `/var/log/nginx/` | Main nginx logs for the server |
If you are not sure of the exact file name, list the folder over SSH with ls /usr/local/apache/domlogs/. Then pick the file that carries your domain name and grows when you open a page.
Pick the CWP log in Find my log
First, install the free plugin from the download page and activate it. Then open Pagereckon, Settings. The Find my log wizard checks the CWP domlogs folder, for example /usr/local/apache/domlogs/example.com.log, and lists every file PHP can read.
- Find the row with your domain and a check mark under This site.
- Confirm that the Format column says combined.
- Press Use this log. The next run reads the file from the top.
When the table stays empty, paste the full path into Test a path. The test reads a short sample of lines, shows the format and hides the IP in the sample line. It also tells you why a file fails, for example when PHP may not open it.
Give PHP read access on CWP
On CWP, each account usually runs PHP as its own system user. That user often cannot read files under /usr/local/apache/domlogs/, because the folder belongs to root. In that case the test says the file exists, but PHP cannot read it.
Since you have root on most CWP servers, you can grant read access yourself. For example, an ACL gives one user read rights to one file without changing the owner. Check the result with ls -l and run the test again. If a host manages the server for you, ask them for read access to your own domain log.
open_basedir on CWP
Some CWP PHP setups limit PHP with open_basedir. Then the test reports that PHP may not look there. Add /usr/local/apache/domlogs/ to the allowed list for that account, or ask your admin to do it.
Log rotation and .gz copies
Log files grow fast on a busy site, so servers rotate them. When the live file starts over, Pagereckon notices that it shrank and reads it from the top. Because it reads new lines every 10 minutes, it rarely misses anything.
In addition, you can import older days. Add a rotated copy, .gz included, to the Access log path(s) box, one path per line. Pagereckon reads each .gz file once and then keeps only the days inside your retention setting, 90 by default.
Run the ingest from CWP cron
WordPress cron runs every 10 minutes, but only when the site gets visits. A server cron is steadier and lighter. Add this line to the crontab of the site user, with your own path:
*/5 * * * * wp --path=/home/user/public_html pagereckon ingest --max-seconds=240Run it as the same user that owns the WordPress files, so new files keep the right owner. Pagereckon's Settings page prints the line for your site, too.
Fallback when the log stays closed
If you cannot open the log at all, switch Where the visits come from to the PHP request log. Pagereckon then writes its own log of each request that reaches WordPress.
However, the fallback is less complete. Pages served from a page cache never reach PHP, so those views and the bots that get them are missing. As a result, numbers will be lower than with the real CWP log. To learn how the plugin sorts humans from bots, read the WordPress statistics plugin overview or the AI crawler checker page.
CWP questions
Does CWP write separate logs for nginx and Apache?
Not per domain. The CWP wiki says the per domain log in /usr/local/apache/domlogs serves both, so one file covers the site.
Is the CWP error log useful for Pagereckon?
No. Pagereckon reads access logs only. Pick the file without .error in its name.
Can I use the free plugin on several CWP sites?
Yes. The free plugin has no site limit. Install it on each WordPress site and pick that domain's own log.