Opens in a new tab

Save $50 Every Year with MainWP

Get $50 off the MainWP Yearly Plan this Black Friday. Your discount renews every year! Claim Your $50 Discount
← Back to blog

How to Disable Live Traffic in Wordfence on Your Site

This post may contain affiliate links. Read the disclosure.
Disable Live Traffic - Wordfence

If you notice many hits in your site’s analytics that have the following query string showing in the URL on your site;

/?wordfence_lh=1

Wordfence - WordPress Plugin

Then the query string is added by the live traffic feature in the Wordfence plugin. The real-time live traffic feature in Wordfence adds a query string to URLs on the site to track those.

To disable live traffic in Wordfence, you can set the Live Traffic Options to “Security Only”. From your wp-admin, navigate to:

Wordfence > All Options > Tool Options > Live Traffic Options

Wordfence - Live Traffic Options

Also, disable the signed-in users like below:

Wordfence - Live Traffic Options: Security Only

Alternatively, the Wordfence plugin has a constant that can be set in the wp-confg.php file, which will disable the live traffic feature and stop other administrator users from changing the live traffic mode to all traffic mode.

define('WORDFENCE_DISABLE_LIVE_TRAFFIC', true);

However, since Wordfence release 7.2.3, the default traffic mode for live traffic has been security only.

Useful Links

Explore MainWP Pro
Get MainWP Pro
Topics: Tips & Tricks