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

Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
Related posts :

494 Responses to “Single Click Plugin Updater WordPress Plugin”

Pages: « 14 5 6 7 8 [9] 10 11 12 13 1417 » Show All

  1. 225
    nurikabe says:

    Minor annoyance: Warning: mb_stristr() [function.mb-stristr]: Empty delimiter. in /var/www/…/wordpress/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 253

    I should probably just hide warnings, but thought I’d let you know.

  2. 226
    White Shadow says:

    @nurikabe – Thanks, that is actually a minor, stealthy bug. I’ll fix it right away.

  3. 227
    Marcel says:

    Problem with the latest 2 versions …

    “Error reporting set to E_ALL.
    .
    .
    .
    (Debug version = redirection will not happen. Script execution finished.)”

    Why is it in a debug version?

  4. 228
    White Shadow says:

    @Marcel – Debug mode should be off by default, and I’m sure it is off in the latest version. Irregardless of how it came to be enabled, you can turn debug mode off in Plugins -> Upgrade Settings. Uncheck the box “Enable debug mode”.

  5. I love this plugin, but over the past few weeks it has been messing things up a bit – since the 2.6 change in wordpress.

    Apparently it is changing the ownership of the files it updates, and the only way I can change them back is to contact my host’s customer support which is extremely lousy to begin with…

    Is there a way to keep the plugin from changing the user?

  6. 230
    White Shadow says:

    @Patrick Curl – The plugin doesn’t intentionally change the file owner, but any files it creates (and possibly files it overwrites, too) will be owned by the same user account under which the webserver/PHP engine are running. There’s nothing I can do about this – it depends entirely on your server configuration. most likely the problem was caused by a configuration change, too.

  7. 231
    aperture physics says:

    This is a great plug in

  8. 232
    billyduc says:

    HI white Shadow…Your Plugin is great..It ’s help me save time very much…
    But I have the problem when click to UPGRADE ALL or AUTOMATIC UPGRADE….
    It return me an error…I followed your installation instruction…and have already chmod to 777…you may see my picture http://depchai1vung.googlepages.com/InstallerError.png

  9. 233
    White Shadow says:

    @billyduc – It looks like PclZip doesn’t work on your server… Do you have the latest version of the plugin (2.2.8)? Some older versions had this problem with PclZip.

  10. 234
    billyduc says:

    I ‘ve already use the latest version !

  11. 235
    White Shadow says:

    Well, I don’t know. You could hack the plugin to use unzip instead of PclZip if you want – edit the line 831 :

    function extractFile( $zipfile, $type='autodetect', $target = '', $use_pclzip=true

    Change "true" to "false" :

    function extractFile($zipfile, $type='autodetect', $target = '', $use_pclzip=false

    Might help.

  12. 236
    Grant Barrett says:

    There’s a cosmetic issue caused by a conflict between WP Super Cache 0.6.5 and One Click Plugin Updater 2.2.8.

    Any time there is a plugin that needs to be updated, OCPU always says that the name of the plugin is WP Super Cache, even though it places the little alert underneath the correct plugin and even though the updates work just fine. If there’s more than one plugin needing to be updated, then the alerts all say WP Super Cache Here’s a screen grab:

    http://www.waywordradio.org/wp-supercache-conflict.jpg

  13. 237
    White Shadow says:

    @Grant Barrett – Thanks for letting me know. Fixed.

  14. 238
    efe says:

    pls l have this errror when l want to use this plugin. pls what do l do? pls give me step by step how to correct it from scratch. lam using version 2.2.9

    Will save the new version archive (zip) to a temporary file ‘/tmp/PLGWpTIYb’.
    About to extract ‘/tmp/PLGWpTIYb’.
    Extracting files from /tmp/PLGWpTIYb…
    So far, the type is set to ‘theme’.
    Need to load PclZip.
    gzopen() found, will use PclZip.
    PclZip failed!
    PclZip says : ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’

  15. 239
    White Shadow says:

    @efe – actually I have no idea why some people seem to have problems with PclZip (which is the case in your example). I’d be happy to help but I don’t know how.

  16. 240
    Jeremy says:

    Hi, I’ve recently installed this plugin and I must say it’s great! Previously I was using the “Global Plugin Update Notice” plugin from http://wordpress.org/extend/plugins/global-plugin-update-notice/ which would show me when a plugin had a new version available, but didn’t have its own method of updating the plugin like your one does. Yours is better coz it actually works when I click the update button (well, most of the time anyway).

    One thing that I think is missing from your plugin though, which the GPUN plugin did: when more than one plugin is available for updating, it would be great if your plugin would provide a separate “update” button for each plugin, rather than an “update all” button. Because I might want to just update one of the plugins (using your plugin’s built-in update method) but not update all of them. Currently I can’t selectively do that using your plugin – it’s basically all or nothing.

    I don’t want to rely on WordPress’s own update method, coz for some reason that doesn’t work on my server.

    What do you think about adding this feature sometime? You can check out the GPUN plugin if you want an idea of what I mean.

    In any case, your plugin still rocks, so thanks for that!

    Cheers,
    Jeremy

  17. 241
    White Shadow says:

    @Jeremy – You can update plugins selectively if you go to the “Plugins” page and use the individual “upgrade automatically” links below each plugin. When my plugin is activated those links will use my update algorithm by default, not the WP built-in one. So they should work on your server :)

  18. [...] One Click Plugin Updater [...]

  19. 243
    Jeremy says:

    @White Shadow – thanks for the explanation! I had no idea the individual “upgrade automatically” links used your plugin’s algorithm – that’s good to know! :)

    One other question: every single one of my plugins is hosted on http://wordpress.org/extend/plugins/, yet with your plugin installed, only some of the other plugins show the gold bar to indicate they have Update Notifications enabled. The rest have the grey bar. Why is that? I thought every plugin hosted on the Extend site had Update Notifications enabled?

    In fact sometimes a plugin with a grey bar beside it will still have a new version notification displayed on the Plugins page, and your plugin will show “There is a new version of XYZ available” etc. This has happened to me just today actually. So clearly your plugin is doing the check for all these other plugins, to see which ones are available for updating, but it only shows the gold bar for a few of them. Any idea why that is? Is it a bug perhaps?

    Cheers,
    Jeremy

  20. 244
    White Shadow says:

    @Jeremy – I’m aware of this problem. It happens because there is no “official” way to find out if a plugin can get update notifications. So I use a hack, which is unreliable. It will remain this way until wordpress.org implement it in their API.

  21. 245
    Jeremy says:

    @White Shadow – would it not be correct to say that any plugin hosted at http://wordpress.org/extend/plugins/ supports Update Notifications, and any plugin not hosted there does not? Is your plugin able to tell if a plugin is hosted there or not?

    Another question: is it possible to completely turn off the gold/grey bars from the Plugins page, if I don’t want to see them at all? I can’t see anything on the options page about that. Perhaps a future version of your plugin can allow this?

    Thanks again,
    Jeremy

  22. 246
    White Shadow says:

    @Jeremy – Yes, plugins hosted on wordpress.org will have update notifications. However, verifying this for each plugin separately would be very inefficient, so I’m not using that method.

    You can’t turn the bars off in the current version, but you can always delete the image files from the plugin folder if you don’t want to see them… Maybe I’ll add the option in a new version.

  23. [...] One Click Plugin Updater är ett WordPress-tillägg som låter dej installera, uppdatera och radera tillägg och teman innan du hinner säga “Detta tillägget uppdaterar mina inlägg supersnabbt”… Jag använder det själv! [...]

  24. 248
    Jeremy says:

    Hi White Shadow,
    Are there any release notes for this plugin that I can read? I’m always curious to know what’s changed from version to version with WP plugins! But I can’t find any for yours here or on the WordPress Extend page.

    Cheers,
    Jeremy

  25. 249
    Troy Dean says:

    Whenever I attempt to update a plugin using WP 2.5 and PHP 5 I get the following error message:

    Any clues?

    If I can get this to work I’ll save myself a heap of time. Any assistance much appreciated.

    TWarning: file_put_contents(/home/aclass/public_html/wp-content/plugins/akismet/akismet.gif) [function.file-put-contents]: failed to open stream: Permission denied in /home/aclass/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 1047
    Can’t create file akismet/akismet.gif in /home/aclass/public_html/wp-content/plugins/!
    Main loop finished.

    Can’t create file ‘akismet/akismet.gif’ in ‘/home/aclass/public_html/wp-content/plugins/’

    The full installation log is below :
    Error reporting set to E_ALL.
    Plugin directory is ‘/home/aclass/public_html/wp-content/plugins/’
    Checking to see if /home/aclass/public_html/wp-content/plugins/ is writable.
    Okay.
    Nonce verification passed.
    About to upgrade 1 plugins.
    Upgrading ‘akismet/akismet.php’, download URL is ‘http://downloads.wordpress.org/plugin/akismet.zip’.
    The plugin that needs to be upgraded is not active. Good.
    Downloading ‘http://downloads.wordpress.org/plugin/akismet.zip’…
    Downloaded 12606 bytes.
    Will save the new version archive (zip) to a temporary file ‘/tmp/PLGh1IfAw’.
    About to extract ‘/tmp/PLGh1IfAw’.
    Extracting files from /tmp/PLGh1IfAw…
    So far, the type is set to ‘plugin’.
    Need to load PclZip.
    gzopen() found, will use PclZip.
    Starting extraction to folder ‘/home/aclass/public_html/wp-content/plugins/’.
    Extracting akismet/akismet.gif
    Can’t create file akismet/akismet.gif in /home/aclass/public_html/wp-content/plugins/!
    Main loop finished.

  26. 250
    White Shadow says:

    @Jeremy – You can find something similar in the WordPress Repository – the revision log and this page have some of my comments.

  27. 251
    White Shadow says:

    @Troy Dean – This most likely means the plugin doesn’t have write access to your “wp-content/plugins” folder. Depending on your server configuration you may need to chmod it to 755 or 777 (does that make sense? :) ).

  28. 252
    Donal says:

    I am having the same problem as Efe (comment 238) and had to deactivate the plugin. It only started happening when One Click Installer was upgraded and changed to One Click Plugin Updater.

  29. 253
    White Shadow says:

    @Donal – I think this is caused by the change in the zip library… both plugins use essentially the same library, but OneClick Installer uses an older version, and my plugin uses the newer version that comes with WordPress itself.

    You can check if this is really the cause by replacing pclzip.lib.php in the plugins folder with the one from this archive. If it starts working OK after that then we’ll know it’s the ZIP library.

  30. 254
    Donal says:

    @White Shadow

    I replaced that file and got the same result I’m afraid.

Pages: « 14 5 6 7 8 [9] 10 11 12 13 1417 » Show All

Leave a Reply