WP-statistics plugin NOT working?

I am receiving the following error in/for WP-STATISTICS plugin:

Here is an error associated with Connecting WordPress Rest API, Please Flushing rewrite rules or activate wp rest api for performance WP-Statistics Plugin Cache / Go Settings->Permalinks

I’m not sure why this is happening, or what to do about it… any suggestions?

Same for me!
REST Api was disabled in a utility plugin

add_filter('json_enabled', '__return_false');
add_filter('json_jsonp_enabled', '__return_false');

It was not a problem until 6th september.
Check if this link is working for you:

No - it’s not working??? Any tips on how to fix this?

If you have flushed rewrite rules and correctly configured any cache plugin (and also flushed its cache) you can try to to do a massive text search for json_enabled to understand what is blocking REST Api. Maybe something like a “speed up wordpress” plugin…

@Simone this snippet does not work as intended, the filter names you mentioned are very outdated and the correct way to disable the REST API is using the rest_authentication_errors filter.

Dick, the main problem is that the REST API is not working correctly on your site. There are lots of potential reasons for this. Security plugins or a problem with your host’s configuration are the most likely.

1 Like

Hmmm… any suggestions for how to go about analyzing that? Remove the security plugin, maybe? It’s really kind of annoying… HELP, please!

Ah, never mind on the stats plugin - I just replaced it with a plugin called WP POWER STATS, which doesn’t appear to error. BUT - in your experience, are there other things which can be affected by the REST API? If so, is it possible to disable it, or would that just cause more problems?

Dick, the problem you had wasn’t caused by the REST API. It was caused by something else interfering with the correct operation of the REST API. As James said, the most likely possibility is that a security plugin disabled the REST API.

If you want to debug the REST API, then the best way is to use two plugins by Pete Nelson: REST API Log will log what happens when the API is called, while REST API Toolbox enables you to control it. Of course, if you still have the REST API disabled by something else, these won’t help you until you have turned that other plugin (or a specific setting within that plugin) off.

There are cases where the REST API is disabled wholesale, or point by point. As others noted, security plugins are a good place to start. Other plugins, such as my Username Protection plugin, may not seem like a security plugin, but, indeed it is and it does disrupt access to the users endpoints for non-logged in users. This doesn’t seem related to the issue you experienced – and I don’t know if you even have it installed – but, it couldn’t hurt to disable it and see if you’ve run out of other options.

1 Like

You can use the Health Check plugin.
It would be nice to know if it works on CP. (most of it was added to WP as Site Health) It has a Troubleshoot mode that is not in WP, that helps you isolate the plugin or theme causing your problem.