Documentation Troubleshooting Troubleshoot with Cache Plugins

Troubleshoot with Cache Plugins

Sometimes the Cache Plugins are conflicting with WP Statistics. On the below, we are the most common solutions to troubleshoot the issue with Cache Plugins.

Cache plugin option

Make sure the Cache Compatibility option in WP Statistics » Settings » General is enabled. (If it’s already enabled, try to disable it and wait for a while, then check out the Overview page)

Excluding WP Statistics’ REST-API

Ignore the plugin’s REST API namespace for caching. Our namespace is: wp-json/wp-statistics/v2/hit (You can exclude it from caching or disable REST API caching.)


 It is necessary to disable any security plugins that disable the WP-REST API, such as WP-Hide, or add the WP Statistics endpoint to the white list. 

Troubleshooting XHR Response

You can help yourself debug the issue. First, open a single post in private browsing mode. Then, use the Inspect tool to navigate to Network → XHR. After refreshing the page, click on the request to view the response. This will show you why the stats might not be counted correctly in the response.

Cookie nonce is invalid

This means that your site’s Nonce tokens are being cached and reused beyond their designated time frame.

WordPress Nonces can be used for 12 hours before they become invalid. To avoid expired Nonces from being sent to WP Statistics you must ensure pages with WP Statistics are not cached, or not cached for longer than 12 hours.