最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - Where does WordPress store plugin (enableddisabled) status for multisite?

programmeradmin5浏览0评论

A recent update to one of the plugins I use broke my multisite blog and in the process of debugging it, all of the plugins got disabled. Now I have to try to figure out which plugins used to be enabled, but that's a big chore for various reasons.

I've probably got at least one backup since the last time I toggled plugin, but I don't know where WordPress stores plugin state information for a multisite blog.

I tried dumping the whole WordPress database to try to search for the plugin state settings, but the thing is too much of a monster to manually search through, especially since most search terms return too many results to be practical.

Does anybody know where WordPress stores the state of plugins? Does it store them in every sub-blog's settings or is there a master one? What about network-enabled plugins?

A recent update to one of the plugins I use broke my multisite blog and in the process of debugging it, all of the plugins got disabled. Now I have to try to figure out which plugins used to be enabled, but that's a big chore for various reasons.

I've probably got at least one backup since the last time I toggled plugin, but I don't know where WordPress stores plugin state information for a multisite blog.

I tried dumping the whole WordPress database to try to search for the plugin state settings, but the thing is too much of a monster to manually search through, especially since most search terms return too many results to be practical.

Does anybody know where WordPress stores the state of plugins? Does it store them in every sub-blog's settings or is there a master one? What about network-enabled plugins?

Share Improve this question asked Jul 23, 2020 at 2:32 SynetechSynetech 3211 gold badge4 silver badges17 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

I found it. It's in the active_sitewide_plugins value of the wordpress_sitemeta table.

You can use active_plugins from the wordpress Options API if your site is not Multi-site wordpress site.

You can run it as:

add_action("plugins_loaded", function(){
           $active_plugins = get_option("active_plugins", []);
           
           echo "<pre>";
           print_r( $active_plugins );
           echo "</pre>";
}

and it will print out all active plugins on your site.

发布评论

评论列表(0)

  1. 暂无评论