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 :

534 Responses to “Single Click Plugin Updater WordPress Plugin”

  1. White Shadow says:

    @Troy – Might it be that you’re using suPHP or Suhosin (spelling?) and the problematic files/directories have a different owner or group than the updater’s files?

  2. Sam L says:

    Hey,

    As of version 2.4 I can’t upload new plugins/themes from web anymore, it gives me the error below. (when trying to install a random plugin as an example)

    Downloading ‘http://downloads.wordpress.org/plugin/ozh-admin-drop-down-menu.zip’…
    Downloaded 11998 bytes.
    Will save the new version archive (zip) to a temporary file ‘/var/tmp/PLGy67yfX’.
    About to extract ‘/var/tmp/PLGy67yfX’.
    Extracting files from /var/tmp/PLGy67yfX…
    So far, the type is set to ‘plugin’.
    gzopen() found, will use PclZip.
    PclZip failed!
    PclZip says : ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’

    Any help would be much appreciated!

  3. Tony Gray says:

    @Sam L – I am getting the exact same thing. I’ve tried the permissions thing. Nothing…ideas?

  4. White Shadow says:

    2.0.8 – 2.4 use the same version of PclZip, so that’s probably not the problem. An error like that might appear if the download was corrupted somehow, but then it should be only temporary – the update should work after a few tries. Besides, the download size shown in the log is correct, so I doubt it was corrupted.

    If the bug was happening on my own server I’d hack the plugin to leave the temporary downloaded file in place and look at it (the .zip) myself to see why it doesn’t work. I’d also directly test PclZip on that file.

    Obviously I can’t do any of that with your server, so I’ll only attempt to make the file extraction algorithm a bit more robust.

  5. José Luís says:

    Version 2.4.1 fixed PCLZip error on updates (didn’t test on installation of new plugins yet).

    But I had to set Plugin Updater Module to “WordPress core”, since every time I ordered an update it just told me the plugin was “activated” but didn’t update at all…

  6. White Shadow says:

    @José Luís – I can guess why that is, but I don’t know how to fix that. Ah well.

  7. […] plugin instalowałem przez wtyczkę One Click Plugin Updater (również polecam) ale według danych w internecie aby ta wtyczka działała […]

  8. Navjot Singh says:

    Whenever a new plugin update is released and I use your plugin to update those plugins, it does not reactivate the plugins after updating and instead shows this error message:

    Fatal error: Call to a member function dprint() on a non-object in /home/navjot/public_html/nspeaks/wp-content/plugins/one-click-plugin-updater/do_update.php on line 49

    Though the plugins do get updated!

    I am using WordPress 2.6.1

  9. White Shadow says:

    @Navjot Singh – This can happen when you update this plugin along with other plugins (via “Upgrade All”). It’s a known issue and will be fixed eventually.

  10. Neil says:

    I just wanted to mention to other people getting this message:

    Extracting files from /var/tmp/PLGy67yfX…
    So far, the type is set to ‘plugin’.
    gzopen() found, will use PclZip.
    PclZip failed!
    PclZip says : ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’

    Mine works, once I switch it to use ‘WordPress Core’ updater in the Plugin Updater Options. Since everything other than the actual upgrade engine looks the same to me, I’m probably not going to fight with it, unless a lot of free time comes up . . .

    I’m thinking it’s running into errors reading/writing from /var/tmp … /var doesn’t show up as an existing folder in my PHP File Manager. I’ll know more when I get into the backend . . . but that won’t be soon.

    HTH

  11. Marshall says:

    8/22

    Hate to burst any bubbles but the one click updater does not work with WP 2.6.1 as far as I can tell. I constantly deactivates a plugin so the upgrade can be installed and then the install fails. I checked the directory permissions and all relevant directories are 755 so that should not be the issue.

    The old one click installer did what it was supposed to do quite well and included zip unpack and ftp capabilities. Fortunately, I save all the stuff I install and and go back to the deprecated version!

  12. chris tolles says:

    i, too, get a error when trying to upgrade (still in WP v2.6, single click v2.3):

    Fatal error: Call to a member function on a non-object in /homepages/15/d206252512/htdocs/watson/wp-content/plugins/one-click-plugin-updater/do_update.php on line 127

    help! with some rarity it works, but even then i have to reenable the upgraded plugins individually. thanks for the great plugin, sorry to be that guy with the mysterious error…

  13. @Neil

    I was having the same problem….switched over to “WordPress Core” and the plugin updater works now.

  14. White Shadow says:

    @chris tolles – Does that “Fatal error” happen all the time, or when upgrading several plugins at a time (i.e. “Upgrade All”)? I’m fairly certain it shouldn’t happen for individual upgrades.

  15. chris tolles says:

    @White Shadow
    after reading your comment about someone else’s similar error, i tried upgrading them one at a time, but i got the exact same error whether attempting a single upgrade or multiple.

    incidentally, i tried the upgrades a few minutes later, and it worked fine if they were deactivated AND i did them one by one, so go figure.

    thanks for a great plugin!

  16. White Shadow says:

    @chris tolles – I think if you download and (re-)install the latest version 2.4.3 this particular error should go away.

  17. Travis says:

    I have a basic question about the one-click plugin updater. When I activate the plug, one of the changes I see is that some of the plugins have a yellow vertical line to the right of the plugin name while others have a vertical grey line. What does this indicate?

    By the way, this is a great plugin. Thanks for creating and maintaining it.

  18. Travis says:

    @Travis
    I should have checked all of the links. Great addlion. Now I know what needs to be manually updated. Thanks!!

  19. White Shadow says:

    Thanks, I’m glad you like the plugin 🙂

Leave a Reply