admin管理员组

文章数量:1287625

I'm currently doing an audit on a WordPress site for some supervisors and was curious if there was any way under the hood to see when was the last time a plugin was actually activated. This will give me some leverage in removing them if its been a while. Is there anyway I can complete this type of investigation through WordPress?

I'm currently doing an audit on a WordPress site for some supervisors and was curious if there was any way under the hood to see when was the last time a plugin was actually activated. This will give me some leverage in removing them if its been a while. Is there anyway I can complete this type of investigation through WordPress?

Share Improve this question edited Sep 16, 2021 at 17:06 klewis asked Sep 16, 2021 at 16:53 klewisklewis 8991 gold badge14 silver badges29 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

It looks like, in a Multisite installation, any network-wide plugins record their activation time in a site option. By default, plugins activated in a single site in a Multisite network (or in a single-site installation) do not.

See the source of the activate_plugin() function.

You could write a simple plugin that records that information, using the activated_plugin hook, but that won't help you with any older plugins -- any data you record that way would only exist from now[^1] on out.

[^1]: If by "now" we mean "the moment you activate your plugin-tracking plugin".

本文标签: Determining when was the last time a plugin was activated