Manually deactivating/activating multisite plugins

There are times that activating or deactivating plugins from the admin dashboard fails. Another option is via WP cli plugin deactivate/activate, but there are times that it will also fail specially on very large sites. The last recourse is meddling directly in the DB.

Usually, activated plugins can be found from wp_options table but for multisites, it can be found in wp_sitemeta for network activated plugins. It is in serialized

Useful commands when using the command line:

To list list the

SELECT * FROM pantheon.wp_sitemeta WHERE meta_key = 'active_sitewide_plugins';

It would return something like:


The meta_value is in a PHP serialized format, so in layman terms analysis:

a:5:{ // Number of plugins network activated 
 // s:[string-count-of-plugin-path]:"path/of/plugin/entrypointfile.php";i:[unix-timestamp];

You can then add or delete network plugins based using the the UPDATE command, just make sure you take note of the meta_is as it will be unique on each site, so updating it with new values should be something like:

UPDATE pantheon.wp_sitemeta SET meta_value = 'a:2:{s:24:\"wordpress-seo/wp-seo.php\";i:1587091946;s:17:\"wp-cfm/wp-cfm.php\";i:1587091946;}' WHERE (meta_id = '22');

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.