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. Ian says:

    Thanks! I uploaded the new version and here is the error that I’m getting now.

    PclZip Error : ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’

  2. White Shadow says:

    Ahha, I think this is the PclZip bug that was discussed on WordPress traca while ago, which was apparently solved by WP developers. I’ll see if I can find and apply the same solution to my plugin – new version shall be up soon.

  3. Ian says:

    I’m getting strange permissions problems with this plugin, it is making (I think) my plugins owned by user and group “99”, which won’t allow me to delete them manually, nor change their permissions. I’m using 2.0.9 of the plugin,

  4. White Shadow says:

    The plugin doesn’t explicitly set the user/group. Looks like the files it creates have the owner set to the webserver’s user. In this case, the “nobody” (I think I remember that’s what user 99 is). Usually that isn’t a problem.

    I’m not too familiar with the *nix file system permissions, but I suspect there is no way to change this behaviour in the plugin (at least, the manual for chown() says “file owner can only be changed by superuser”). I could make the plugin set the created files to mode 0777 if that helps any?

  5. Ian says:

    Sure, that might help, but I don’t know since I’m not very familiar with file permissions. I’m in discussions with my host to figure out what is going on here.

    Maybe you could make an advanced option to what permissions settings to the plugin should change the files to. I’m

  6. White Shadow says:

    Okay, I’ll add the option later.

  7. Chris Masse says:

    Version 2.1 updates the plugins but tells us at the end that they were not updated.
    Deactivating and re-activating the plugin corrects the plugin.

  8. White Shadow says:

    Hmm, interesting. For the moment, I have no idea why that would happen.

  9. Chris Masse says:

    Version 2.1

    Your plugin updates well the plugins, but at the end gives the wrong message (that the plugins still need to be updated).
    A close look-up shows that the plugins have indeed been updated.
    A small bug, probably.
    Anyway, a great plugin.
    Chris Masse

  10. White Shadow says:

    Hmm, I actually noticed this happening for one of my plugins, but I thought it was a one-time fluke. I’ll look into it.

  11. Chris Masse says:

    Interesting, on one of my small blogs, everything updated well, and the message at the end is correct.
    If I understand why it works on some blogs and not others, I’ll tell you. I don’t get it right now.
    There is a general problem of slowness in both cases….
    Developing 😀

  12. Chris Masse says:

    I have updated to 2.1.1. and all seems fine, as of now. If I notice something, I’ll tell you.
    Thanks a lot for all your work,
    Chris MASSE

  13. […] One Click Plugin Updater : aggiornamento in massa di tutti i plugin con nuove versioni e installazione di temi o plugin da url o da file zippati sul proprio pc […]

  14. Chris Masse says:

    Hi,
    I like this plugin.
    One bug, though.
    I often notice that when I disable it, all of the sudden, it turns out that there were plugins to be updated that your plugin didn’t alert me on.
    Thanks for your attention,
    Chris Masse

  15. White Shadow says:

    Hasn’t happened to me. Might be possible if you’ve changed the update check interval or set enabled the anonymization. In that case, the plugin uses it’s own check-for-updates function. It might miss some updates because it sends version 0.0 instead of the current version (that’s necessary to get the “updates enabled” markings), and because of how WordPress.org handles the API (inconsistent and undocumented 😛 ).

    I’ll see if I can do anything about it.

  16. Chris Masse says:

    “Might be possible if you’ve changed the update check interval ”
    Bingo!!!! 😀

  17. White Shadow says:

    Eh, I experimented a bit with it today – no luck.

    The problem is that, apparently, when you send a “check for updates” request to api.wordpress.org, it does not simply compare the version info you give it with the latest versions of known plugins. It also does additional verification, and doesn’t return the latest version for some plugins when the reported version isn’t “right”. My plugin always reports version “0.0” for all installed plugins, because I want to know which plugins have update notifications available.

    Could be fixed by splitting up the “notifications enabled?” and “updates available?” checks… Which would lead to code duplication and additional HTTP requests :/

  18. miom says:

    I can use the single click update pluging in Wordress only if I deactivate it. If I deactivate the one click updater plugin; the required plugin still needing updating will still show the upgrade automatically link; which I click and it works fine. All updated!! My question is why doesn’t this plugin work when it’s activated the way it’s supposed too????

  19. White Shadow says:

    My guess would be the plugin doesn’t work at all, and when it’s deactivated you’re using the built-in updater that WP 2.5 has.

    I’ll need more info to figure this out if that’s not the case.

  20. Engelium says:

    Hi

    I only have a question: if I use this plugin can I uninstall the “Global Plugin Update Notice” ?

    I didn’t undertand if this do also the same work

    Tnx

Leave a Reply