Get Alerted When a WordPress Plugin or Theme Changes

Get Alerted When a WordPress Plugin or Theme Changes

Most WordPress compromises do not start with a Hollywood hack. They start with a plugin nobody remembers installing, a theme switch on a live shop, or an editor who deactivated a security plugin “just for a minute.”

If you manage client sites — or a store that cannot go down — you want a ping the moment the plugin list or active theme changes. The AlertHub plugin already ships presets for these hooks. No custom PHP required.

Why this is a high-signal security alert

  • Unauthorized plugin installs often precede malware. You may not watch FTP logs all day; you will notice a Telegram message.
  • Deactivating Wordfence / a WAF plugin is a classic attacker (or careless contractor) move.
  • Theme switches on WooCommerce sites break templates and checkout. Minutes matter.
  • Agencies need a paper trail: who changed production, and when. AlertHub keeps a searchable history even if the Slack message scrolled away.

Pair this with failed login alerts and PHP fatal error monitoring for a lightweight watchdog that does not replace a full security suite — it tells you first.

Connect the plugin

Follow WordPress setup: install from WordPress.org, paste the project key under Tools → AlertHub, send a test alert.

Then connect at least one push channel: Telegram is ideal for on-call; Slack for the agency channel; WhatsApp on Pro if that is where the client lives.

Alert A: Plugin activated

FieldValue
Hookactivated_plugin (preset in the plugin)
TitleWordPress plugin activated: {{0}}
DescriptionPlugin file **{{0}}** was activated on this site. If you did not do this, investigate immediately.
LevelWarning

{{0}} is the plugin file path (for example wordfence/wordfence.php or hello.php).

Alert B: Plugin deactivated

This is often more important than activation. Attackers disable security plugins; developers disable caching “temporarily” and forget.

FieldValue
Hookdeactivated_plugin
TitleWordPress plugin deactivated: {{0}}
DescriptionPlugin **{{0}}** was deactivated. Confirm this was intentional.
LevelWarning

Alert C: Theme switched

FieldValue
Hooktheme_switched
TitleWordPress theme switched: {{0}}
DescriptionActive theme changed to **{{0}}**. Check the storefront and checkout.
LevelWarning

Extra hooks worth adding on production

These are not all in the preset dropdown — type them manually. Any valid WordPress action works.

HookTitle ideaLevel
delete_userWordPress user deleted: ID {{0}}Warning
wp_update_user(noisy — use Info or skip)Info
upgrader_process_completeWordPress update finishedInfo
switch_themeAlternative to theme_switchedWarning

delete_user is especially useful on membership or LMS sites: an unexpected deletion is worth a phone buzz.

How agencies use this

  1. One AlertHub project per client (or per environment: staging vs production).
  2. Set the plugin source name to the client domain (cliente.com) so the dashboard stays readable.
  3. Invite the account manager as a project member. They see history without wp-admin access.
  4. Keep Info for noisy events (core updates) and Warning for activate/deactivate/theme/user-delete.

You can change Slack ↔ Telegram later from AlertHub Connections. You never reopen 40 WordPress dashboards to paste a new webhook.

What this is not

AlertHub is not a malware scanner, file-integrity monitor, or firewall. Keep Wordfence, Patchstack, or your host WAF. This layer answers a different question: did someone change the site while I was not looking?

FAQ

Will theme/plugin updates flood me?
Updates typically fire upgrader_process_complete, not activated_plugin. Activation alerts fire when something is turned on, which is rarer and more suspicious.

Can I see who did it?
The default hooks pass the plugin file or theme slug, not the current user. Check WordPress activity logs (or a lightweight audit plugin) after the AlertHub ping tells you when to look.

Does it work on WordPress.com / managed hosts?
If you can install plugins from WordPress.org, yes. Some locked-down hosts restrict custom plugins — test with the built-in Send Test Alert button.

Next steps

Install the plugin from the WordPress guide, add the three alerts above, and route them to Telegram. The next surprise plugin will not be a surprise.

Related: WooCommerce order alerts · new user and comment alerts