How can a plugin run a script after being updated in MultiSite?

It’s is good idea to run similar DB updates per site basis. You can store plugins version in wp_options (which are options for current site), then on admin_init compare version and run upgrade.

If you want to run more complicated/big updates, I would recommend creating custom upgrade page for plugin and only display admin notice for users, so they can run it manually.

Leave a Comment