• I am so close to finishing up the ability to auto-update my personal (non-repository) plugins, but getting it to work on a network install is a nightmare. I have no other way to include the files for the update than from my plugin’s primary file, but this file does not load whatsoever from the network admin because it is not network enabled, only individually per site. This means that the information is never properly loaded into the network plugins page, and if I visit this page, it throws a wp_error and ditches the upgrade information.

    Is this an impossible task?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Creating a plugin that works in a single and multisite WordPress environment is a bit harder to write, but not impossible.

    Are you able to enable the plugin at the network level? You can then use the is_multisite function to have your plugin do different things based on the environment its in.

    For example, if the plugin is enabled at the network level, you could have a settings page at the network level where you can select which sites it should be enabled on. Or you could just use the network settings page to administer the plugin (like update it), but then have settings pages on each child site where it can be customized per site.

    A good example of how a plugin might behave differently depending on where it’s activated is the W3 Total Cache plugin. Once you upload it, you can enable it on each site individually and not worry about enabling it at the network level. Or you can enable it at the network level to configure things globally (for all sites) and have the child sites inherit that or customize it beyond that.

    Thread Starter Bolder Elements

    (@hystericallyme)

    Thanks for the feedback. I have noticed that on certain plugins there are settings pages in both the network admin and each child. What I want is for it to not matter whether it is network enabled or not. The problem is that for network sites plugins cannot be updated from the child sites. If you click update you are redirected to the network admin. But since my site is not network enabled, it doesn’t seem to load in the network area and thus my update information disappears.

    So I know I can check to see if multisite is enabled, but how do I make sure my plugin (or at least the update file) loads without having to add a network settings page or network enable the plugin?

    Thread Starter Bolder Elements

    (@hystericallyme)

    I have spent so many hours browsing through the Codex and various other websites and I’ve learned much but not what I need to know. If somebody could push me in the right direction, I would be eternally grateful!

    I understand now that only “Network Activated” plugins will run in the Network end of the dashboard. The thing I have noticed with some plugins, is that I have not network activated them, they do not appear network activated in the plugins list, but when I visit the Editor, it says ‘(active)’. All of my plugins say ‘(inactive)’ when I visit the editor despite the fact that they are enabled on a per site basis just like the others.

    What am I doing wrong? How do I trick WordPress into thinking the plugin is active so it checks for updates?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Private Plugin Auto Updates’ is closed to new replies.