How to Track Silently Disabled Plugins in WordPress

Over the last year, we’ve been on the trail of a mystery.

People are shocked to find that plugins will silently change from “Active” to “Inactive” on their WordPress site. Their site has broken and with no warning.

The mystery started when one Logtivity customer reported that an active plugin had been disabled. It was a weekend, and they hadn’t made any changes to the site.

A few weeks later, this happened to another customer.

Then a potential customer contacted us. They weren’t even using Logtivity, but this happened to them all the time.

So we started to dig deeper and it turns out that this problem happens to a lot of people. In this screenshot below, you can see lots of reports on Reddit and the WordPress forums. So we became determined to solve the mystery.

Plugins deactivate themselves

Possible reasons for plugin deactivations

We have some ideas on what might be causing this problem, but we haven’t “solved” it. This is because we believe is that there are several possible causes.

Theory #1. Insufficient memory on the server. Some users have reported that they have stopped the plugins from disabling by increasing the memory limits for their site.

Theory #2. File permission errors. We have suspicions that some sites can end up with incorrect file permissions for a plugin’s files. Deleting and reinstalling the plugin is a possible fix. You can also try resetting the file permissions for everything in your WordPress site folder.

Theory #3. Object caching. If you’re using object caching, it will probably store database queries and may include some that are related to active plugins. It’s possible that the database and cache end up storing different values and causing problems. If this problem happens to you regularly, consider disabling object caching to see if that helps.

Theory #4. Hosting company blacklists. A lot of hosting companies now have a list of banned plugins that they don’t allow on their servers. Look to see if the plugin you’re having problems with is on your host’s banned list.

Theory #5. Plugin updates. This is the most likely explanation for most sites, but again there appear to be multiple causes:

  • The updated plugin may have an error so WordPress deactivates it. It’s worth checking your site’s error logs to see if there are any errors related to your plugin.
  • The problem is more likely to occur if the plugin has dependencies. For example, we’ve seen problems when there’s a main plugin and add-ons. The official WordPress documentation supports this idea when talking about the deactivate_plugins hook: “This function is often used by a plugin to deactivate itself if the plugin requires the presence of certain features that are missing in environment after an administrator has activated it. This is usually the last step in a dependency-checking function.”
  • The plugin update may connect with other theories on this list. So when a particular plugin is updated, it may cause the memory or file permission issues to cause the deactivation. This is more likely if you’re updating several plugins at the same time. You can consider disabling auto-updates and manually updating your plugins.

Good news: you can track plugin deactivations

Here at Logtivity, we have developed a solution so you can get logs and alerts whenever a plugin is silently disabled.

When a plugin is silently deactivated, we record a new log called “Plugin Active State Changed”. There will be no User or IP Address associated with the log because it happens without any human intervention. Logtivity will show you if the plugin is now active or inactive. You’ll also find a note inside the log saying “Not done through UI”.

Plugin Active State Changed log

You can use the normal alerts service in Logtivity to send you notifications whenever this event happens. This will send you an email or Slack alert whenever a plugin is silently enabled or disabled.

Create global alert for Plugin Active State Changed

How does Logtivity track plugin deactivations?

Let me explain how this solution works. The key is that Logtivity is integrated with the “Site Health” feature in WordPress. You can find this by going to “Tools” and then “Site Health” in your WordPress admin menu,

WordPress Site Health

This Site Health information from inside WordPress is visible inside your Logtivity dashboard. We record your WordPress and PHP versions, plus the installed plugins and themes.

Site Health in Logtivity

Your dashboard now has a list of all the plugins and themes installed on your site.

Plugins screen in Site Health

Because we have a complete list of all the plugins on your site, we can warn you when that list changes without any human interaction.

Give Logtivity a try today

Logtivity makes WordPress activity logs simple. You get one activity log dashboard for all your sites. From the Logtivity app, you can see a live stream of everything happening on your sites.

Start your free Logtivity trial today. It’s only $1 per site per month.