Botmotive

Install the WordPress plugin

This page helps you install the Botmotive plugin, connect it to your Botmotive site and check that it works.

The plugin sends your site's traffic to Botmotive every minute. It also applies the fixes you choose in Botmotive, such as blocking a bot.

Before you start

  • You need a Botmotive account, or you can create one while connecting.
  • Your site needs WordPress 5.8 or later and PHP 7.4 or later.
  • You need to be a WordPress administrator.

1. Install and activate the plugin

The plugin is not on WordPress.org yet, so you install it from a zip file.

  1. Download botmotive.zip, or get it from your site's WordPress install page in the dashboard.
  2. Go to Plugins → Add New and click Upload Plugin.
  3. Choose the zip file and click Install Now.
  4. Click Activate Plugin.

To check the file before you install it, download the versioned zip from the home page instead. Its SHA-256 is in botmotive.io/download/botmotive.json: compare it with shasum -a 256 botmotive-*.zip.

After you activate it, WordPress opens Settings → Botmotive. Nothing is sent to Botmotive until you connect.

2. Connect your site

  1. Go to Settings → Botmotive and click Connect to Botmotive.
  2. Sign in to Botmotive, or create an account.
  3. Check the site address shown is yours. Pick an existing Botmotive site, or keep New site and give it a name.
  4. Click Connect. You're sent back to WordPress, which says Connected to your site's name.

There's nothing to copy: Botmotive gives the plugin a token of its own, named "WordPress plugin" with your site's address, which you can see and revoke in Botmotive. Connecting again replaces it.

Connect needs your site to use https. If it doesn't, or you'd rather do it by hand:

  1. Open Advanced: enter a site ID and token by hand.
  2. In Site ID, paste your site ID, such as my-blog.
  3. In Site token, paste a site token. It starts with bm_.
  4. Leave API URL as https://api.botmotive.io.
  5. Click Save Changes.

After you save, the token box says Saved. Leave blank to keep. To change the token, paste a new one and save.

Then choose Visitor IP from. See the next section.

3. Choose "Visitor IP from"

Botmotive needs each visitor's real address. Some hosts put another service in front of your site. WordPress then sees that service's address instead.

  • Direct connection (REMOTE_ADDR): the default. Pick this if visitors reach your server directly.
  • Cloudflare (CF-Connecting-IP): pick this if your site uses Cloudflare. It is only safe if your server accepts traffic from Cloudflare alone.
  • Proxy (X-Forwarded-For) or Proxy (X-Real-IP): pick one if your host puts a proxy or load balancer in front of your site. Ask your host which one.

Don't pick Cloudflare or a proxy unless your site really sits behind it. Otherwise visitors can fake their address and dodge your blocks.

4. Turn on the AI-agent beacon (optional)

Some AI agents drive a real browser, so your logs show them as people. The beacon helps spot them.

  1. Under AI agents in browsers, tick Add the Botmotive beacon to your pages.
  2. Click Save Changes.

The beacon is a small script from Botmotive. It counts clicks, key presses and pointer movement. It never sends page content or what people type. It isn't loaded for visitors signed in to WordPress.

Results appear under Possible AI agents in browsers on your dashboard. They are hints, not proof, so Botmotive offers no fixes for them.

5. Read the Status table

The Status table on Settings → Botmotive shows how the plugin is doing.

Row What it means
Logs sent When traffic was last sent, such as "2 mins ago". "never" means nothing has been sent yet.
Rules checked When the plugin last fetched your fixes. It checks every five minutes.
Early guard Installed or Not installed. See below.
Last error Only shown after a problem. It stays visible after the problem is fixed.

If Logs sent and Rules checked are both recent, any error shown has passed. See plugin error messages.

6. Use "Sync now"

Click Sync now below the Status table. It tries to install the early guard, fetches your rules and sends waiting traffic. You then see Synced with Botmotive. Use it after changing settings, or to test the connection.

7. The early guard

When you activate the plugin, it adds wp-content/mu-plugins/botmotive-guard.php. It appears under Plugins → Must-Use as Botmotive guard. It applies your blocks before other plugins and your theme load, which saves server time.

If WordPress can't write to that folder, you see: "The early guard could not be installed in wp-content/mu-plugins. Rules still apply, but only after other plugins load."

Your rules still work. To fix it, ask your host to make wp-content/mu-plugins writable, then click Sync now.

8. Active rules

The Active rules table lists the fixes you applied in Botmotive, with an Action and what it Applies to.

  • Block: the visitor gets a "Forbidden." page.
  • Throttle: the visitor gets "Too many requests." above a limit, such as 120/hour.
  • Allow: a trusted bot is never throttled.
  • Deny path: requests for files such as /.env are refused for everyone.
  • XML-RPC off: turns off WordPress's XML-RPC feature.

New fixes show up within five minutes. To undo one, use Undo in Botmotive.

Some blocks target a whole network. WordPress can't apply those, so the page tells you to apply them at your CDN.

Your AI bot choices from Botmotive Settings are added to robots.txt, between # BEGIN Botmotive and # END Botmotive. They are left out while Settings → Reading discourages search engines.

9. Physical robots.txt file

Some sites have a real robots.txt file instead of the one WordPress makes. The plugin can't add lines to that file.

You then see: "Your site has a physical robots.txt file, so WordPress cannot add your Botmotive opt-outs. Add these lines to it:". Copy the lines shown into your file. Do this again whenever you change your AI bot choices.

10. Page caches and CDNs

Caching plugins and CDNs serve saved pages without running WordPress. The plugin never sees those requests, so it can't log or block them. Images and other files WordPress doesn't serve are missed too.

For a fuller picture, also send logs from your CDN. See Getting started.

11. Multisite

On a multisite network, each subsite has its own Settings → Botmotive page, settings, rules and traffic. Add each subsite as its own site in Botmotive, and paste that site's ID and token into the subsite's page.

You can activate the plugin for the whole network or for single subsites. The early guard is one file in wp-content/mu-plugins, shared by every subsite. Deactivating the plugin on one subsite leaves the guard in place while the plugin is still on for another subsite or for the network.

12. Uninstall

  1. Go to Plugins and click Deactivate under Botmotive. Sending stops, your rules stop applying, the early guard is removed and Botmotive's robots.txt lines disappear.
  2. To remove everything, click Delete. This removes the plugin's settings, on every subsite of a multisite network, and its wp-content/botmotive folder.

If you copied lines into a physical robots.txt file, remove them yourself.

Check it worked

  1. Go to Settings → Botmotive and click Sync now.
  2. Rules checked should show a recent time.
  3. Early guard should say Installed.
  4. Visit your site while signed out. After a minute or two, reload the settings page. Logs sent should show a recent time.
  5. After 15 to 30 minutes, open your Botmotive dashboard and click 15m.

The plugin sends traffic when WordPress runs its scheduled tasks, which only happens when someone visits. On a quiet site, ask your host to run wp-cron.php every minute, for example * * * * * wget -q -O - https://example.com/wp-cron.php.

If something goes wrong

See Troubleshooting for missing data, page caches, the IP setting, robots.txt files, the early guard and plugin error messages.

All guides