Archives: Documentations

Installing a WP-Statistics Add-On

We have some add-ons to add more features to your WP-Statistics and take your WordPress website to the next level. Each WP-Statistics add-on has specific options, and with these advanced extra details, you can get to know your customers more accurately. Here is the growing list of our all available add-ons. Installing a WP-Statistics add-on […]


WP Statistics requires a few things to work: WordPress 3.0 or above PHP 5.4 or above MySQL 5.0 or above WP Statistics might work on older versions of the above software, but then again, it might not (it does NOT function on any PHP versions before 5.3). The GeoIP support also requires a few additional […]

Installing WP-Statistics Plugin

Installing the WP-Statistics free plugin on your WordPress website is so easy and similar to install any other plugins. You can do it in different ways. Here we will show you 3 ways of installing WP-Statistics: Install WP-Statistics from WordPress Plugins Directory (Recommended) You can install and activate the plugin by searching it in the […]


Welcome to WP Statistics! This plug-in is designed to track your visitor statistics in WordPress, completely locally without any external services. There are several key items to note about WP Statistics: No external services are required, all code and data run locally on your system. Aggregate data is stored whenever possible, when specific data is […]

Receive the number of visits from a page in different periods of time

You can receive the number of visits from a page or post in different periods of time. It’s done with the following PHP code: $page_id = 3; // Your page ID // Get page hits $today = wp_statistics_pages(‘today’, $page_id); $yesterday = wp_statistics_pages(‘yesterday’, $page_id); $week = wp_statistics_pages(‘week’, $page_id); $month = wp_statistics_pages(‘month’, $page_id); $year = wp_statistics_pages(‘year’, $page_id); […]

How stops tracking in WP-Statistics with PHP code

Sometimes you need to enable the Anonymize IP Addresses with PHP code for GDPR, in here is an example to do that.   add_action(‘init’, function (){ global $WP_Statistics; $WP_Statistics->update_option( ‘anonymize_ips’, ‘1’ ); });  

How to Sanitize user IP?

If the IP value returned from your server has a special character, you can use:wp_statistics_sanitize_user_ipfilter in your WordPress for getting real user IP from your $_SERVER. For example: If your $_SERVER:,, And your real IP is: You can use a final filter like this: Or if your $_SERVER: for=;proto=http; And your […]

Main Interface

WP Statistics adds a top level menu to your admin interface in WordPress, you should see this in your main admin page (image on the left below) near the bottom of the list, clicking on it should bring up the additional items (image on the right below): Each of these options will be discussed in […]

Dashboard Widgets

WP Statistics includes a number of dashboard widgets you can add if you have read access to WP Statistics. By default, the dashboard widgets are not displayed, with the exception of the Quick Stats widget. Users can individually enable them through the “Screen Options” drop down in the WordPress dashboard. The dashboard widgets mirror the […]