Single Click Plugin Updater WordPress Plugin

This plugin extends the plugin update notification feature introduced in WordPress 2.3 by adding an “update automatically” link to update notifications. When you click the link, the new version of the corresponding plugin is downloaded and installed automatically. It also lets you know which plugins have update notifications enabled.
Update 06.04.2008 : Version 2.0.1 with much more features is out. More info here.

Download it now! (37 Kb)

How It Works (In Detail)

To be able to display the new link this plugin will hide the original update notification and display a slightly modified one. Here’s what happens when you click the “update automatically” link :

  1. If the plugin that needs to be updated is active, it is deactivated.
  2. The Plugin Updater retrieves the plugin’s page from WordPress.org and finds the download link.
  3. The new version is downloaded and extracted to the wp-content/plugins directory (this directory must be writable by the Updater plugin).
  4. If necessary, the updated plugin is re-activated.

All this happens in the background, so if everything works OK you’ll end up back at the “Plugins” tab. If there are any errors the plugin will display an error message and abort the upgrade.

Requirements

  • WordPress 2.3 or newer.
  • CURL library installed or allow_url_fopen enabled in php.ini. If you don’t know what that means, don’t worry – at least one of these is available on most webservers by default.
  • The /plugins directory must be writable by WordPress. The exact file permissions depend on the server configuration. Read more about file permissions. 666 or 755 may be sufficient, and 777 will always work, though this is not recommended due to security risks.

The plugin has been tested and works under Firefox 2.x, Opera 9.x and, as of version 1.0.5, Internet Explorer.

Installation

To install the plugin, please follow these steps:

  • Download the one-click-plugin-updater.zip file (below) to your computer.
  • Unzip the file.
  • Upload “one-click-plugin-updater” folder to the “/wp-content/plugins/” directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.

That’s it.

Download

one-click-plugin-updater.zip (40 Kb)
CC-GNU GPL

Related posts :

535 Responses to “Single Click Plugin Updater WordPress Plugin”

  1. Richard says:

    Hi again,

    Thanks for pointing it out to me. I knew that it’d be somewhere, and I looked for it, but I didn’t see it in the box under the post, sorry. ๐Ÿ™‚

    So it just happened again. I checked the source, and it’s all there.

    Like I said, this is what happens:

    1- Notification of a plugin to be updated
    2- go to plugins page
    3- I see the list of plugins, then poof, it disappears

    What now?

  2. Richard says:

    Ok, I’ve narrowed it down to the following:

    The cause is a conflict of some sort between Ozh’s “Better Plugin Page” plugin and the one-click updater. I don’t know why, but with no other plugins active but these two and a 3rd (old version of any plugin), I can repeat the problem mentioned above, when there is a plugin that needs updating. Any thoughts?

  3. White Shadow says:

    I’ll have to install Ozh’s plugin and see if I can determine the cause.

    …tomorrow ๐Ÿ˜‰

  4. White Shadow says:

    Well, I installed “Better Plugin Page”, but apparently it doesn’t do much of anything in my test setup (WP 2.8 beta). However, I had another idea – if you switch the “Updated Module” setting in Plugins -> Upgrade Settings it might make the problem go away.

    Also, you could try toggling the “Highlight plugins that have update notification enabled” checkbox on/off; it’s bugged anyway.

  5. Richard says:

    Hello again,

    Well, it’s 100% reproducible for me, with WP 2.7.1. I’ve tried it on several domains that I have, different WP installations; the only thing they had in common was Ozh’s plugin, Single-Click updater, and an old version of any random plugin (all other plugins were deactivated). I never experienced this before installing Single-click. Strange…

    I tried your 2 suggestions, and the various possible combinations, but nothing.

    I have yet to try with WP 2.8 beta, but I’ll take your word for it that it’s fine. It’d be nice if we could fix it for 2.7.1 though. ๐Ÿ™‚

  6. White Shadow says:

    Still can’t reproduce. I installed my and Ozh’s plugins on this site (WP 2.7.1), installed an outdated version of another plugin (WP-SpamFree) and everything worked fine.

    Are you, by any chance, using a different version of plugin updater? I have 2.4.6 here.

  7. White Shadow says:

    Disregard that, I found the problem. You can download the fixed version from the link in the post above.

  8. baron says:

    Works great, thank you

  9. Richard says:

    Hi!

    That fixed it, thanks. However, it no longer shows up in the nice yellow bar anymore. I also have the Fluency2 plugin installed, maybe it has something to do with that? Or did you just change the css for it? Oh well, I prefer a well-functioning plugin to a pretty one any day, so thanks for fixing it again!

    Richard

  10. White Shadow says:

    I changed the CSS. Initially it used a built-in CSS class that is used to display the update notifications below each plugin row. However, this also caused the conflict with Ozh’s plugin which expects the class to be used only for it’s original purpose. So I made a new class.

  11. Richard says:

    Hello again,

    Yeah, I figured as much, but I didn’t have the time to dig into it deeper to confirm it. Thanks for the update. Any chance you can make the new class look like the built-in class, or similar? Maybe a bright orange color (kidding, the yellow is bright enough!). It’s so much prettier. ๐Ÿ™‚

  12. White Shadow says:

    I actually copied the built-in style to the new class, but apparently there must be another rule somewhere that I missed and that’s what makes it look different. I’ll see if I can fix it when I have time.

  13. […] One Click Plugin Updater – This is the key for having a bunch of plugins. You’re smart, I bet you can figure out what it does. I’ve run into problems with it not wanting to update a few plugins ever, but having to update one manually is fine with me. […]

  14. Johnny C says:

    seems like it needs an update to 2.8…. =(

  15. White Shadow says:

    A partial update for WP 2.8 will be available shortly. The basic stuff will work (I think), but I really haven’t tested this update in depth.

  16. […] upgrade to the newly released WordPress 2.8. The easy part of upgrading was I was able to use the Upgrade plugins with a single click, install new plugins or themes from an URL or by uploading a file, see which […]

  17. Antonio says:

    Hey White Shadow

    Thanks for all the hard work man! Looking good so far. ๐Ÿ™‚

  18. Johnny C says:

    something went completely nutz after the update last night…

    whatever the screen on admin front-end I am I get the message:
    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 633

    and if I go to the installed plugins page, I get tons of that… any idea?

  19. White Shadow says:

    Might be fixed in 2.4.9.

Leave a Reply